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:
Olaoluwa Osuntokun committed 2016-06-30 11:53:21 -07:00
1 parent fd02c1c1aa
commit bba9b665ef
10 files changed
+29 -23

No files matched your search

+1 -3
View File
@@ -9,8 +9,6 @@ import (
)
func TestFundingRequestEncodeDecode(t *testing.T) {
copy(revocationHash[:], revocationHashBytes)
// funding request
fr := &FundingRequest{
ReservationID: uint64(12345678),
@@ -23,7 +21,7 @@ func TestFundingRequestEncodeDecode(t *testing.T) {
FeePayer: uint8(0),
PaymentAmount: btcutil.Amount(1234567),
MinDepth: uint32(6),
RevocationHash: revocationHash,
RevocationHash: revHash,
Pubkey: pubKey,
DeliveryPkScript: deliveryPkScript,
ChangePkScript: changePkScript,