mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-02 00:52:13 +02:00
add padding to destination address in tests
This commit is contained in:
parent
9b78bc5ee4
commit
eb8ec2c2ab
@ -29,7 +29,9 @@ func TestSphinxCorrectness(t *testing.T) {
|
||||
|
||||
// Generate a forwarding message to route to the final node via the
|
||||
// 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 {
|
||||
t.Fatalf("Unable to create forwarding message: %#v", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user