mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 22:23:28 +02:00
channeldb: also store their current revocation hash
We now also store their current revocation hash which is given to us along with the revocation key once an initial HTLC is added to a commitment transaction.
This commit is contained in:
@@ -295,6 +295,9 @@ func TestOpenChannelPutGetDelete(t *testing.T) {
|
||||
if !newState.TheirCurrentRevocation.IsEqual(state.TheirCurrentRevocation) {
|
||||
t.Fatalf("revocation keys don't match")
|
||||
}
|
||||
if !bytes.Equal(newState.TheirCurrentRevocationHash[:], state.TheirCurrentRevocationHash[:]) {
|
||||
t.Fatalf("revocation hashes don't match")
|
||||
}
|
||||
|
||||
// Finally to wrap up the test, delete the state of the channel within
|
||||
// the database. This involves "closing" the channel which removes all
|
||||
|
Reference in New Issue
Block a user