mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 10:11:11 +02:00
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:
@@ -15,6 +15,13 @@ import (
|
||||
// Common variables and functions for the message tests
|
||||
|
||||
var (
|
||||
revHash = [32]byte{
|
||||
0xb7, 0x94, 0x38, 0x5f, 0x2d, 0x1e, 0xf7, 0xab,
|
||||
0x4d, 0x92, 0x73, 0xd1, 0x90, 0x63, 0x81, 0xb4,
|
||||
0x4f, 0x2f, 0x6f, 0x25, 0x88, 0xa3, 0xef, 0xb9,
|
||||
0x6a, 0x49, 0x18, 0x83, 0x31, 0x98, 0x47, 0x53,
|
||||
}
|
||||
|
||||
// For debugging, writes to /dev/shm/
|
||||
// Maybe in the future do it if you do "go test -v"
|
||||
WRITE_FILE = false
|
||||
|
Reference in New Issue
Block a user