mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-01-29 11:14:26 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user