@@ -2706,8 +2706,8 @@ impl Writeable for OutboundTrampolinePayload {
2706
2706
}
2707
2707
2708
2708
2709
- impl < NS : Deref > ReadableArgs < ( Option < PublicKey > , & NS ) > for InboundOnionPayload where NS :: Target : NodeSigner {
2710
- fn read < R : Read > ( r : & mut R , args : ( Option < PublicKey > , & NS ) ) -> Result < Self , DecodeError > {
2709
+ impl < NS : Deref > ReadableArgs < ( Option < PublicKey > , NS ) > for InboundOnionPayload where NS :: Target : NodeSigner {
2710
+ fn read < R : Read > ( r : & mut R , args : ( Option < PublicKey > , NS ) ) -> Result < Self , DecodeError > {
2711
2711
let ( update_add_blinding_point, node_signer) = args;
2712
2712
2713
2713
let mut amt = None ;
@@ -4406,7 +4406,7 @@ mod tests {
4406
4406
assert_eq ! ( encoded_value, target_value) ;
4407
4407
4408
4408
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4409
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4409
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4410
4410
if let msgs:: InboundOnionPayload :: Forward {
4411
4411
short_channel_id, amt_to_forward, outgoing_cltv_value
4412
4412
} = inbound_msg {
@@ -4431,7 +4431,7 @@ mod tests {
4431
4431
assert_eq ! ( encoded_value, target_value) ;
4432
4432
4433
4433
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4434
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4434
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4435
4435
if let msgs:: InboundOnionPayload :: Receive {
4436
4436
payment_data : None , sender_intended_htlc_amt_msat, cltv_expiry_height, ..
4437
4437
} = inbound_msg {
@@ -4459,7 +4459,7 @@ mod tests {
4459
4459
assert_eq ! ( encoded_value, target_value) ;
4460
4460
4461
4461
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4462
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4462
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4463
4463
if let msgs:: InboundOnionPayload :: Receive {
4464
4464
payment_data : Some ( FinalOnionHopData {
4465
4465
payment_secret,
@@ -4495,7 +4495,7 @@ mod tests {
4495
4495
} ;
4496
4496
let encoded_value = msg. encode ( ) ;
4497
4497
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4498
- assert ! ( msgs:: InboundOnionPayload :: read( & mut Cursor :: new( & encoded_value[ ..] ) , ( None , && node_signer) ) . is_err( ) ) ;
4498
+ assert ! ( msgs:: InboundOnionPayload :: read( & mut Cursor :: new( & encoded_value[ ..] ) , ( None , & node_signer) ) . is_err( ) ) ;
4499
4499
let good_type_range_tlvs = vec ! [
4500
4500
( ( 1 << 16 ) - 3 , vec![ 42 ] ) ,
4501
4501
( ( 1 << 16 ) - 1 , vec![ 42 ; 32 ] ) ,
@@ -4504,7 +4504,7 @@ mod tests {
4504
4504
* custom_tlvs = & good_type_range_tlvs;
4505
4505
}
4506
4506
let encoded_value = msg. encode ( ) ;
4507
- let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & encoded_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4507
+ let inbound_msg = ReadableArgs :: read ( & mut Cursor :: new ( & encoded_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4508
4508
match inbound_msg {
4509
4509
msgs:: InboundOnionPayload :: Receive { custom_tlvs, .. } => assert ! ( custom_tlvs. is_empty( ) ) ,
4510
4510
_ => panic ! ( ) ,
@@ -4529,7 +4529,7 @@ mod tests {
4529
4529
let target_value = <Vec < u8 > >:: from_hex ( "2e02080badf00d010203040404ffffffffff0000000146c6616b021234ff0000000146c6616f084242424242424242" ) . unwrap ( ) ;
4530
4530
assert_eq ! ( encoded_value, target_value) ;
4531
4531
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4532
- let inbound_msg: msgs:: InboundOnionPayload = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & & node_signer) ) . unwrap ( ) ;
4532
+ let inbound_msg: msgs:: InboundOnionPayload = ReadableArgs :: read ( & mut Cursor :: new ( & target_value[ ..] ) , ( None , & node_signer) ) . unwrap ( ) ;
4533
4533
if let msgs:: InboundOnionPayload :: Receive {
4534
4534
payment_data : None ,
4535
4535
payment_metadata : None ,
@@ -4759,7 +4759,7 @@ mod tests {
4759
4759
let mut rd = Cursor :: new ( & big_payload[ ..] ) ;
4760
4760
4761
4761
let node_signer = test_utils:: TestKeysInterface :: new ( & [ 42 ; 32 ] , Network :: Testnet ) ;
4762
- <msgs:: InboundOnionPayload as ReadableArgs < ( Option < PublicKey > , & & test_utils:: TestKeysInterface ) > >
4762
+ <msgs:: InboundOnionPayload as ReadableArgs < ( Option < PublicKey > , & test_utils:: TestKeysInterface ) > >
4763
4763
:: read ( & mut rd, ( None , & & node_signer) ) . unwrap ( ) ;
4764
4764
}
4765
4765
// see above test, needs to be a separate method for use of the serialization macros.
0 commit comments