mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-04 12:31:39 +02:00
add padding to destination address in tests
This commit is contained in:
@ -29,7 +29,9 @@ func TestSphinxCorrectness(t *testing.T) {
|
|||||||
|
|
||||||
// Generate a forwarding message to route to the final node via the
|
// Generate a forwarding message to route to the final node via the
|
||||||
// generated intermdiates nodes above.
|
// generated intermdiates nodes above.
|
||||||
fwdMsg, err := NewForwardingMessage(route, []byte("roasbeef"), []byte("testing"))
|
// Destination should be Hash160, adding padding so parsing still works.
|
||||||
|
dest := append([]byte("roasbeef"), bytes.Repeat([]byte{0}, securityParameter-8)...)
|
||||||
|
fwdMsg, err := NewForwardingMessage(route, dest, []byte("testing"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Unable to create forwarding message: %#v", err)
|
t.Fatalf("Unable to create forwarding message: %#v", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user