lnwire: all hashes within the protocol are now 32-bytes
We now enforce that the site of all revocation pre-images+hashes (used for HTLC’s) are now 32-bytes. Additionally, all payment pre-images are now required to be 32-bytes not he wire. There also exists a Script level enforcement of the payment pre-image size at a lower level. This commit serves to unify the sizes of all hashes/pre-images across the codebase.
This commit is contained in:
10 files changed
+29
-23
No files matched your search
@@ -7,8 +7,8 @@ import (
|
||||
)
|
||||
|
||||
func TestHTLCSettleRequestEncodeDecode(t *testing.T) {
|
||||
redemptionProofs := make([][20]byte, 1)
|
||||
copy(redemptionProofs[0][:], bytes.Repeat([]byte{0x09}, 20))
|
||||
redemptionProofs := make([][32]byte, 1)
|
||||
redemptionProofs[0] = revHash
|
||||
|
||||
// First create a new HTLCSR message.
|
||||
settleReq := NewHTLCSettleRequest(outpoint1, HTLCKey(23), redemptionProofs)
|
||||
|
||||
Reference in new issue
Block a user