@@ -2756,8 +2756,8 @@ impl Writeable for OutboundTrampolinePayload {
2756
2756
}
2757
2757
2758
2758
2759
- impl < NS : Deref > ReadableArgs < ( Option < PublicKey > , & NS ) > for InboundOnionPayload where NS :: Target : NodeSigner {
2760
- fn read < R : Read > ( r : & mut R , args : ( Option < PublicKey > , & NS ) ) -> Result < Self , DecodeError > {
2759
+ impl < NS : Deref > ReadableArgs < ( Option < PublicKey > , NS ) > for InboundOnionPayload where NS :: Target : NodeSigner {
2760
+ fn read < R : Read > ( r : & mut R , args : ( Option < PublicKey > , NS ) ) -> Result < Self , DecodeError > {
2761
2761
let ( update_add_blinding_point, node_signer) = args;
2762
2762
2763
2763
let mut amt = None ;
@@ -4456,7 +4456,7 @@ mod tests {
4456
4456
assert_eq ! ( encoded_value, target_value) ;
4457
4457
4458
4458
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4459
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4459
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4460
4460
if let msgs:: InboundOnionPayload :: Forward {
4461
4461
short_channel_id, amt_to_forward, outgoing_cltv_value
4462
4462
} = inbound_msg {
@@ -4481,7 +4481,7 @@ mod tests {
4481
4481
assert_eq ! ( encoded_value, target_value) ;
4482
4482
4483
4483
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4484
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4484
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4485
4485
if let msgs:: InboundOnionPayload :: Receive {
4486
4486
payment_data : None , sender_intended_htlc_amt_msat, cltv_expiry_height, ..
4487
4487
} = inbound_msg {
@@ -4509,7 +4509,7 @@ mod tests {
4509
4509
assert_eq ! ( encoded_value, target_value) ;
4510
4510
4511
4511
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4512
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4512
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4513
4513
if let msgs:: InboundOnionPayload :: Receive {
4514
4514
payment_data : Some ( FinalOnionHopData {
4515
4515
payment_secret,
@@ -4545,7 +4545,7 @@ mod tests {
4545
4545
} ;
4546
4546
let encoded_value = msg. encode ( ) ;
4547
4547
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4548
- assert ! ( msgs:: InboundOnionPayload :: read( & mut Cursor :: new( & encoded_value[ ..] ) , ( None , && node_signer) ) . is_err( ) ) ;
4548
+ assert ! ( msgs:: InboundOnionPayload :: read( & mut Cursor :: new( & encoded_value[ ..] ) , ( None , & node_signer) ) . is_err( ) ) ;
4549
4549
let good_type_range_tlvs = vec ! [
4550
4550
( ( 1 << 16 ) - 3 , vec![ 42 ] ) ,
4551
4551
( ( 1 << 16 ) - 1 , vec![ 42 ; 32 ] ) ,
@@ -4554,7 +4554,7 @@ mod tests {
4554
4554
* custom_tlvs = & good_type_range_tlvs;
4555
4555
}
4556
4556
let encoded_value = msg. encode ( ) ;
4557
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & encoded_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4557
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & encoded_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4558
4558
match inbound_msg {
4559
4559
msgs:: InboundOnionPayload :: Receive { custom_tlvs, .. } => assert ! ( custom_tlvs. is_empty( ) ) ,
4560
4560
_ => panic ! ( ) ,
@@ -4579,7 +4579,7 @@ mod tests {
4579
4579
let target_value = <Vec < u8 > >:: from_hex ( "2e02080badf00d010203040404ffffffffff0000000146c6616b021234ff0000000146c6616f084242424242424242" ) . unwrap ( ) ;
4580
4580
assert_eq ! ( encoded_value, target_value) ;
4581
4581
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4582
- let inbound_msg: msgs:: InboundOnionPayload = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4582
+ let inbound_msg: msgs:: InboundOnionPayload = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4583
4583
if let msgs:: InboundOnionPayload :: Receive {
4584
4584
payment_data : None ,
4585
4585
payment_metadata : None ,
@@ -4809,7 +4809,7 @@ mod tests {
4809
4809
let mut rd = Cursor :: new ( & big_payload[ ..] ) ;
4810
4810
4811
4811
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4812
- <msgs:: InboundOnionPayload as ReadableArgs < ( Option < PublicKey > , & & test_utils:: TestKeysInterface ) > >
4812
+ <msgs:: InboundOnionPayload as ReadableArgs < ( Option < PublicKey > , & test_utils:: TestKeysInterface ) > >
4813
4813
:: read ( & mut rd, ( None , & & node_signer) ) . unwrap ( ) ;
4814
4814
}
4815
4815
// see above test, needs to be a separate method for use of the serialization macros.
0 commit comments