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:
Olaoluwa Osuntokun
2016-07-05 16:48:23 -07:00
parent 06af4b130f
commit 1f7d9b6425
2 changed files with 15 additions and 3 deletions

View File

@@ -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