@@ -135,7 +135,9 @@ func newTestRoute(numHops int) ([]*Router, *PaymentPath, *[]HopData, *OnionPacke
135135 sessionKey , _ := btcec .PrivKeyFromBytes (
136136 btcec .S256 (), bytes .Repeat ([]byte {'A' }, 32 ),
137137 )
138- fwdMsg , err := NewOnionPacket (& route , sessionKey , nil )
138+ fwdMsg , err := NewOnionPacket (
139+ & route , sessionKey , nil , DeterministicPacketFiller ,
140+ )
139141 if err != nil {
140142 return nil , nil , nil , nil , fmt .Errorf ("unable to create " +
141143 "forwarding message: %#v" , err )
@@ -198,7 +200,7 @@ func TestBolt4Packet(t *testing.T) {
198200 }
199201
200202 sessionKey , _ := btcec .PrivKeyFromBytes (btcec .S256 (), bolt4SessionKey )
201- pkt , err := NewOnionPacket (& route , sessionKey , bolt4AssocData )
203+ pkt , err := NewOnionPacket (& route , sessionKey , bolt4AssocData , BlankPacketFiller )
202204 if err != nil {
203205 t .Fatalf ("unable to construct onion packet: %v" , err )
204206 }
@@ -558,12 +560,14 @@ func newEOBRoute(numHops uint32,
558560 }
559561
560562 // Generate a forwarding message to route to the final node via the
561- // generated intermdiates nodes above. Destination should be Hash160,
563+ // generated intermediate nodes above. Destination should be Hash160,
562564 // adding padding so parsing still works.
563565 sessionKey , _ := btcec .PrivKeyFromBytes (
564566 btcec .S256 (), bytes .Repeat ([]byte {'A' }, 32 ),
565567 )
566- fwdMsg , err := NewOnionPacket (& route , sessionKey , nil )
568+ fwdMsg , err := NewOnionPacket (
569+ & route , sessionKey , nil , DeterministicPacketFiller ,
570+ )
567571 if err != nil {
568572 return nil , nil , err
569573 }
@@ -920,7 +924,9 @@ func TestVariablePayloadOnion(t *testing.T) {
920924
921925 // With all the required data assembled, we'll craft a new packet.
922926 sessionKey , _ := btcec .PrivKeyFromBytes (btcec .S256 (), sessionKeyBytes )
923- pkt , err := NewOnionPacket (& route , sessionKey , associatedData )
927+ pkt , err := NewOnionPacket (
928+ & route , sessionKey , associatedData , BlankPacketFiller ,
929+ )
924930 if err != nil {
925931 t .Fatalf ("unable to construct onion packet: %v" , err )
926932 }
0 commit comments