lnd.xprv/watchtower/wtdb
Conner Fromknecht 5ad9530502
watchtower/wtdb: return sorted ClientSession.CommittedUpdates
This commit replaces the map-based CommittedUpdates field with a slice.
When reading from disk, these will already be sorted by bbolt, so the
client restore the updates as presented without needing to sort them
first.

Since the key in the map variant was the sequence number, we refactor
the CommittedUpdate struct to have a sequence number and an embedded
CommittedUpdateBody (which is equivalent to the old CommittedUpdate).
The database is then expected to populate the sequence number from the
key on disk.

Since the sequence number is now directly integrated in the
CommittedUpdate struct, this allow allows us to remove the now redundant
seqNum argument from CommitUpdate.
2019-05-23 20:47:36 -07:00
..
breach_hint.go watchtower/wtdb/breach_hint: adds BreachHint, txid prefix 2018-10-24 20:18:17 -07:00
client_session.go watchtower/wtdb: return sorted ClientSession.CommittedUpdates 2019-05-23 20:47:36 -07:00
codec_test.go watchtower/wtdb/codec_test: encode/decode quick checks 2019-04-26 17:21:05 -07:00
codec.go watchtower/wtdb/codec: import channeldb code for extension 2019-04-26 17:20:36 -07:00
db_common.go watchtower/wtdb: prepare for addition of client db 2019-05-23 20:47:08 -07:00
log.go watchtower/wtdb/log: add WTDB logs 2019-04-26 17:21:20 -07:00
session_id.go watchtower/wtdb/session_id: adds SessoinID, client pubkey 2018-10-24 20:18:21 -07:00
session_info.go watchtower/wtdb: add encode/decode to session info + updates 2019-04-26 17:20:52 -07:00
session_state_update.go multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
tower_db_test.go watchtower/wtdb/tower_db_test: add mock+bolt iface tests 2019-04-26 17:21:48 -07:00
tower_db.go watchtower/wtdb: prepare for addition of client db 2019-05-23 20:47:08 -07:00
tower.go watchtower/multi: use proper TowerID type 2019-05-23 20:47:22 -07:00
version.go watchtower/wtdb: prepare for addition of client db 2019-05-23 20:47:08 -07:00