lnd.xprv/watchtower/wtmock
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
..
client_db.go watchtower/wtdb: return sorted ClientSession.CommittedUpdates 2019-05-23 20:47:36 -07:00
keyring.go watchtower/wtclient/interface: add SecretKeyRing iface 2019-04-23 20:03:15 -07:00
peer.go watchtower/wtmock/peer: set local pubkey 2019-03-15 02:34:00 -07:00
signer.go watchtower/multi: move MockSigner+MockPeer to wtmock 2019-01-31 18:16:02 -08:00
tower_db.go watchtower/wtmock/tower_db: move mock tower db to wtmock pkg 2019-04-26 17:19:58 -07:00