lnwire: update CommitRevocation for revoke key scheme

With this commit a revocation message now carries 3 items:

  1. A pre-image revoking the lowest unrevoked commitment transaction
in the commitment chain.
  2. A new key which extends the current revocation window by 1. This
key is to be used for new commitment transactions.
  3. A new hash which also extends the current revocation window by 1.
This hash is to be used for new HTLC revocation hashes.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-06-30 11:59:46 -07:00
1 parent 7c7ed5e638
commit 6dcefac868
3 files changed
+34 -17

No files matched your search

+3 -5
View File
@@ -7,13 +7,11 @@ import (
)
func TestCommitRevocationEncodeDecode(t *testing.T) {
copy(revocationHash[:], revocationHashBytes)
copy(nextHop[:], nextHopBytes)
cr := &CommitRevocation{
ChannelPoint: outpoint1,
Revocation: revocationHash,
NextRevocationHash: nextHop,
Revocation: revHash,
NextRevocationKey: pubKey,
NextRevocationHash: revHash,
}
// Next encode the CR message into an empty bytes buffer.