File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,22 @@ impl BlindedPaymentPath {
239239 self . inner_path . blinded_hops . remove ( 0 ) ;
240240 Ok ( ( ) )
241241 } ,
242+ Ok ( (
243+ BlindedPaymentTlvs :: Dummy ( _) ,
244+ control_tlvs_ss
245+ ) ) => {
246+ let next_node_id = node_signer. get_node_id ( Recipient :: Node ) ?;
247+ let mut new_blinding_point = onion_utils:: next_hop_pubkey (
248+ secp_ctx,
249+ self . inner_path . blinding_point ,
250+ control_tlvs_ss. as_ref ( ) ,
251+ )
252+ . map_err ( |_| ( ) ) ?;
253+ mem:: swap ( & mut self . inner_path . blinding_point , & mut new_blinding_point) ;
254+ self . inner_path . introduction_node = IntroductionNode :: NodeId ( next_node_id) ;
255+ self . inner_path . blinded_hops . remove ( 0 ) ;
256+ Ok ( ( ) )
257+ } ,
242258 _ => Err ( ( ) ) ,
243259 }
244260 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ use crate::onion_message::messenger::{
5555use crate :: onion_message:: offers:: OffersMessage ;
5656use crate :: onion_message:: packet:: ParsedOnionMessageContents ;
5757use crate :: prelude:: * ;
58- use crate :: routing:: router:: { Payee , PaymentParameters } ;
58+ use crate :: routing:: router:: { DEFAULT_PAYMENT_DUMMY_HOPS , Payee , PaymentParameters } ;
5959use crate :: sign:: NodeSigner ;
6060use crate :: sync:: Mutex ;
6161use crate :: types:: features:: Bolt12InvoiceFeatures ;
@@ -1857,6 +1857,13 @@ fn expired_static_invoice_payment_path() {
18571857 blinded_path
18581858 . advance_path_by_one ( & nodes[ 1 ] . keys_manager , & nodes[ 1 ] . node , & secp_ctx)
18591859 . unwrap ( ) ;
1860+
1861+ for _ in 0 ..DEFAULT_PAYMENT_DUMMY_HOPS {
1862+ blinded_path
1863+ . advance_path_by_one ( & nodes[ 2 ] . keys_manager , & nodes[ 2 ] . node , & secp_ctx)
1864+ . unwrap ( ) ;
1865+ }
1866+
18601867 match blinded_path. decrypt_intro_payload ( & nodes[ 2 ] . keys_manager ) . unwrap ( ) . 0 {
18611868 BlindedPaymentTlvs :: Receive ( tlvs) => tlvs. payment_constraints . max_cltv_expiry ,
18621869 _ => panic ! ( ) ,
You can’t perform that action at this time.
0 commit comments