@@ -2454,35 +2454,23 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2454
2454
let mut channel_lock = self . channel_state . lock ( ) . unwrap ( ) ;
2455
2455
2456
2456
let mut pending_outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
2457
- let payment_entry = pending_outbounds. entry ( payment_id) ;
2458
- if let hash_map:: Entry :: Occupied ( payment) = & payment_entry {
2459
- if !payment. get ( ) . is_retryable ( ) {
2457
+ let payment = if let Some ( payment) = pending_outbounds. get_mut ( & payment_id) {
2458
+ if !payment. is_retryable ( ) {
2460
2459
return Err ( APIError :: RouteError {
2461
2460
err : "Payment already completed"
2462
2461
} ) ;
2463
2462
}
2464
- }
2463
+ payment
2464
+ } else {
2465
+ debug_assert ! ( false , "This shouldn't happen generally as callsites check this, but technically its race-y and could" ) ;
2466
+ return Err ( APIError :: RouteError { err : "Payment was completed or failed while we were processing it" } ) ;
2467
+ } ;
2465
2468
2466
2469
let id = match channel_lock. short_to_chan_info . get ( & path. first ( ) . unwrap ( ) . short_channel_id ) {
2467
2470
None => return Err ( APIError :: ChannelUnavailable { err : "No channel available with first hop!" . to_owned ( ) } ) ,
2468
2471
Some ( ( _cp_id, chan_id) ) => chan_id. clone ( ) ,
2469
2472
} ;
2470
2473
2471
- macro_rules! insert_outbound_payment {
2472
- ( ) => {
2473
- let payment = payment_entry. or_insert_with( || PendingOutboundPayment :: Retryable {
2474
- session_privs: HashSet :: new( ) ,
2475
- pending_amt_msat: 0 ,
2476
- pending_fee_msat: Some ( 0 ) ,
2477
- payment_hash: * payment_hash,
2478
- payment_secret: * payment_secret,
2479
- starting_block_height: self . best_block. read( ) . unwrap( ) . height( ) ,
2480
- total_msat: total_value,
2481
- } ) ;
2482
- assert!( payment. insert( session_priv_bytes, path) ) ;
2483
- }
2484
- }
2485
-
2486
2474
let channel_state = & mut * channel_lock;
2487
2475
if let hash_map:: Entry :: Occupied ( mut chan) = channel_state. by_id . entry ( id) {
2488
2476
match {
@@ -2512,7 +2500,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2512
2500
{
2513
2501
( ChannelMonitorUpdateStatus :: PermanentFailure , Err ( e) ) => break Err ( e) ,
2514
2502
( ChannelMonitorUpdateStatus :: Completed , Ok ( ( ) ) ) => {
2515
- insert_outbound_payment ! ( ) ;
2503
+ assert ! ( payment . insert ( session_priv_bytes , path ) ) ;
2516
2504
} ,
2517
2505
( ChannelMonitorUpdateStatus :: InProgress , Err ( _) ) => {
2518
2506
// Note that MonitorUpdateInProgress here indicates (per function
@@ -2521,7 +2509,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2521
2509
// indicating that it is unsafe to retry the payment wholesale,
2522
2510
// which we do in the send_payment check for
2523
2511
// MonitorUpdateInProgress, below.
2524
- insert_outbound_payment ! ( ) ; // Only do this after possibly break'ing on Perm failure above.
2512
+ assert ! ( payment . insert ( session_priv_bytes , path ) ) ; // Only do this after possibly break'ing on Perm failure above.
2525
2513
return Err ( APIError :: MonitorUpdateInProgress ) ;
2526
2514
} ,
2527
2515
_ => unreachable ! ( ) ,
@@ -2540,7 +2528,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2540
2528
} ,
2541
2529
} ) ;
2542
2530
} ,
2543
- None => { insert_outbound_payment ! ( ) ; } ,
2531
+ None => { assert ! ( payment . insert ( session_priv_bytes , path ) ) ; } ,
2544
2532
}
2545
2533
} else { unreachable ! ( ) ; }
2546
2534
return Ok ( ( ) ) ;
@@ -2559,12 +2547,18 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2559
2547
/// Value parameters are provided via the last hop in route, see documentation for RouteHop
2560
2548
/// fields for more info.
2561
2549
///
2562
- /// Note that if the payment_hash already exists elsewhere (eg you're sending a duplicative
2563
- /// payment), we don't do anything to stop you! We always try to ensure that if the provided
2564
- /// next hop knows the preimage to payment_hash they can claim an additional amount as
2565
- /// specified in the last hop in the route! Thus, you should probably do your own
2566
- /// payment_preimage tracking (which you should already be doing as they represent "proof of
2567
- /// payment") and prevent double-sends yourself.
2550
+ /// If a pending payment is currently in-flight with the same [`PaymentHash`] provided, this
2551
+ /// method will error with an [`APIError::RouteError`]. Note, however, that once a payment
2552
+ /// is no longer pending (either via [`ChannelManager::abandon_payment`], or handling of an
2553
+ /// [`Event::PaymentSent`]) a second payment with the same [`PaymentHash`] can be sent.
2554
+ ///
2555
+ /// Thus, in order to ensure that duplicate payments are not sent, you should likely implement
2556
+ /// your own [`PaymentHash`]-based tracking of payments, including storing received
2557
+ /// [`PaymentPreimage`]s as proof of payment.
2558
+ ///
2559
+ /// For backwards-compatibility, this method returns a [`PaymentId`] which uniquely represents
2560
+ /// this payment and is used in [`ChannelManager::abandon_payment`] and
2561
+ /// [`ChannelManager::retry_payment`], however the vaule is always the [`PaymentHash`].
2568
2562
///
2569
2563
/// May generate SendHTLCs message(s) event on success, which should be relayed.
2570
2564
///
@@ -2590,14 +2584,50 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2590
2584
/// newer nodes, it will be provided to you in the invoice. If you do not have one, the Route
2591
2585
/// must not contain multiple paths as multi-path payments require a recipient-provided
2592
2586
/// payment_secret.
2587
+ ///
2593
2588
/// If a payment_secret *is* provided, we assume that the invoice had the payment_secret feature
2594
2589
/// bit set (either as required or as available). If multiple paths are present in the Route,
2595
2590
/// we assume the invoice had the basic_mpp feature set.
2591
+ ///
2592
+ /// [`Event::PaymentSent`]: events::Event::PaymentSent
2596
2593
pub fn send_payment ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ) -> Result < PaymentId , PaymentSendFailure > {
2597
- self . send_payment_internal ( route, payment_hash, payment_secret, None , None , None )
2594
+ let total_value_msat = route. paths . iter ( ) . map ( |path| path. last ( ) . map ( |h| h. fee_msat ) . unwrap_or ( 0 ) ) . sum ( ) ;
2595
+ let payment_id = PaymentId ( payment_hash. 0 ) ;
2596
+ self . add_new_pending_payment ( payment_hash, * payment_secret, payment_id, total_value_msat) ?;
2597
+ self . send_payment_internal ( route, payment_hash, payment_secret, None , payment_id, None ) ?;
2598
+ Ok ( payment_id)
2599
+ }
2600
+
2601
+ #[ cfg( any( test, feature = "_test_utils" ) ) ]
2602
+ pub fn send_payment_with_id ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > , payment_id : PaymentId ) -> Result < ( ) , PaymentSendFailure > {
2603
+ let total_value_msat = route. paths . iter ( ) . map ( |path| path. last ( ) . map ( |h| h. fee_msat ) . unwrap_or ( 0 ) ) . sum ( ) ;
2604
+ self . add_new_pending_payment ( payment_hash, * payment_secret, payment_id, total_value_msat) ?;
2605
+ self . send_payment_internal ( route, payment_hash, payment_secret, None , payment_id, None )
2598
2606
}
2599
2607
2600
- fn send_payment_internal ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > , keysend_preimage : Option < PaymentPreimage > , payment_id : Option < PaymentId > , recv_value_msat : Option < u64 > ) -> Result < PaymentId , PaymentSendFailure > {
2608
+ // Only public for testing, this should otherwise never be called direcly
2609
+ pub ( crate ) fn add_new_pending_payment ( & self , payment_hash : PaymentHash , payment_secret : Option < PaymentSecret > , payment_id : PaymentId , total_msat : u64 ) -> Result < ( ) , PaymentSendFailure > {
2610
+ let mut pending_outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
2611
+ match pending_outbounds. entry ( payment_id) {
2612
+ hash_map:: Entry :: Occupied ( _) => Err ( PaymentSendFailure :: ParameterError ( APIError :: RouteError {
2613
+ err : "Payment already in progress"
2614
+ } ) ) ,
2615
+ hash_map:: Entry :: Vacant ( entry) => {
2616
+ entry. insert ( PendingOutboundPayment :: Retryable {
2617
+ session_privs : HashSet :: new ( ) ,
2618
+ pending_amt_msat : 0 ,
2619
+ pending_fee_msat : Some ( 0 ) ,
2620
+ payment_hash,
2621
+ payment_secret,
2622
+ starting_block_height : self . best_block . read ( ) . unwrap ( ) . height ( ) ,
2623
+ total_msat,
2624
+ } ) ;
2625
+ Ok ( ( ) )
2626
+ } ,
2627
+ }
2628
+ }
2629
+
2630
+ fn send_payment_internal ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > , keysend_preimage : Option < PaymentPreimage > , payment_id : PaymentId , recv_value_msat : Option < u64 > ) -> Result < ( ) , PaymentSendFailure > {
2601
2631
if route. paths . len ( ) < 1 {
2602
2632
return Err ( PaymentSendFailure :: ParameterError ( APIError :: RouteError { err : "There must be at least one path to send over" } ) ) ;
2603
2633
}
@@ -2607,7 +2637,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2607
2637
let mut total_value = 0 ;
2608
2638
let our_node_id = self . get_our_node_id ( ) ;
2609
2639
let mut path_errs = Vec :: with_capacity ( route. paths . len ( ) ) ;
2610
- let payment_id = if let Some ( id) = payment_id { id } else { PaymentId ( self . keys_manager . get_secure_random_bytes ( ) ) } ;
2611
2640
' path_check: for path in route. paths . iter ( ) {
2612
2641
if path. len ( ) < 1 || path. len ( ) > 20 {
2613
2642
path_errs. push ( Err ( APIError :: RouteError { err : "Path didn't go anywhere/had bogus size" } ) ) ;
@@ -2667,12 +2696,13 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2667
2696
} else { None } ,
2668
2697
} )
2669
2698
} else if has_err {
2670
- // If we failed to send any paths, we shouldn't have inserted the new PaymentId into
2671
- // our `pending_outbound_payments` map at all.
2672
- debug_assert ! ( self . pending_outbound_payments. lock( ) . unwrap( ) . get( & payment_id) . is_none( ) ) ;
2699
+ // If we failed to send any paths, we should remove the new PaymentId from the
2700
+ // `pending_outbound_payments` map, as the user isn't expected to `abandon_payment`.
2701
+ let removed = self . pending_outbound_payments . lock ( ) . unwrap ( ) . remove ( & payment_id) . is_some ( ) ;
2702
+ debug_assert ! ( removed, "We should always have a pending payment to remove here" ) ;
2673
2703
Err ( PaymentSendFailure :: AllFailedRetrySafe ( results. drain ( ..) . map ( |r| r. unwrap_err ( ) ) . collect ( ) ) )
2674
2704
} else {
2675
- Ok ( payment_id )
2705
+ Ok ( ( ) )
2676
2706
}
2677
2707
}
2678
2708
@@ -2733,7 +2763,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2733
2763
} ) )
2734
2764
}
2735
2765
} ;
2736
- return self . send_payment_internal ( route, payment_hash, & payment_secret, None , Some ( payment_id) , Some ( total_msat) ) . map ( |_| ( ) )
2766
+ self . send_payment_internal ( route, payment_hash, & payment_secret, None , payment_id, Some ( total_msat) )
2737
2767
}
2738
2768
2739
2769
/// Signals that no further retries for the given payment will occur.
@@ -2773,22 +2803,30 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2773
2803
/// would be able to guess -- otherwise, an intermediate node may claim the payment and it will
2774
2804
/// never reach the recipient.
2775
2805
///
2776
- /// See [`send_payment`] documentation for more details on the return value of this function.
2806
+ /// See [`send_payment`] documentation for more details on the return value of this function
2807
+ /// and idempotency guarantees provided.
2808
+ ///
2809
+ /// Note that the [`PaymentId`] for the generated payment will be
2810
+ /// `PaymentId(PaymentHashReturned.0)`.
2777
2811
///
2778
2812
/// Similar to regular payments, you MUST NOT reuse a `payment_preimage` value. See
2779
2813
/// [`send_payment`] for more information about the risks of duplicate preimage usage.
2780
2814
///
2781
2815
/// Note that `route` must have exactly one path.
2782
2816
///
2783
2817
/// [`send_payment`]: Self::send_payment
2784
- pub fn send_spontaneous_payment ( & self , route : & Route , payment_preimage : Option < PaymentPreimage > ) -> Result < ( PaymentHash , PaymentId ) , PaymentSendFailure > {
2818
+ pub fn send_spontaneous_payment ( & self , route : & Route , payment_preimage : Option < PaymentPreimage > ) -> Result < PaymentHash , PaymentSendFailure > {
2785
2819
let preimage = match payment_preimage {
2786
2820
Some ( p) => p,
2787
2821
None => PaymentPreimage ( self . keys_manager . get_secure_random_bytes ( ) ) ,
2788
2822
} ;
2789
2823
let payment_hash = PaymentHash ( Sha256 :: hash ( & preimage. 0 ) . into_inner ( ) ) ;
2790
- match self . send_payment_internal ( route, payment_hash, & None , Some ( preimage) , None , None ) {
2791
- Ok ( payment_id) => Ok ( ( payment_hash, payment_id) ) ,
2824
+ let total_value_msat = route. paths . iter ( ) . map ( |path| path. last ( ) . map ( |h| h. fee_msat ) . unwrap_or ( 0 ) ) . sum ( ) ;
2825
+ let payment_id = PaymentId ( payment_hash. 0 ) ;
2826
+ self . add_new_pending_payment ( payment_hash, None , payment_id, total_value_msat) ?;
2827
+
2828
+ match self . send_payment_internal ( route, payment_hash, & None , Some ( preimage) , payment_id, None ) {
2829
+ Ok ( ( ) ) => Ok ( payment_hash) ,
2792
2830
Err ( e) => Err ( e)
2793
2831
}
2794
2832
}
@@ -2798,7 +2836,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2798
2836
/// us to easily discern them from real payments.
2799
2837
pub fn send_probe ( & self , hops : Vec < RouteHop > ) -> Result < ( PaymentHash , PaymentId ) , PaymentSendFailure > {
2800
2838
let payment_id = PaymentId ( self . keys_manager . get_secure_random_bytes ( ) ) ;
2801
-
2802
2839
let payment_hash = self . probing_cookie_from_id ( & payment_id) ;
2803
2840
2804
2841
if hops. len ( ) < 2 {
@@ -2809,8 +2846,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2809
2846
2810
2847
let route = Route { paths : vec ! [ hops] , payment_params : None } ;
2811
2848
2812
- match self . send_payment_internal ( & route, payment_hash, & None , None , Some ( payment_id) , None ) {
2813
- Ok ( payment_id) => Ok ( ( payment_hash, payment_id) ) ,
2849
+ let total_value_msat = route. paths . iter ( ) . map ( |path| path. last ( ) . map ( |h| h. fee_msat ) . unwrap_or ( 0 ) ) . sum ( ) ;
2850
+ self . add_new_pending_payment ( payment_hash, None , payment_id, total_value_msat) ?;
2851
+
2852
+ match self . send_payment_internal ( & route, payment_hash, & None , None , payment_id, None ) {
2853
+ Ok ( ( ) ) => Ok ( ( payment_hash, payment_id) ) ,
2814
2854
Err ( e) => Err ( e)
2815
2855
}
2816
2856
}
@@ -7400,6 +7440,7 @@ mod tests {
7400
7440
// Use the utility function send_payment_along_path to send the payment with MPP data which
7401
7441
// indicates there are more HTLCs coming.
7402
7442
let cur_height = CHAN_CONFIRM_DEPTH + 1 ; // route_payment calls send_payment, which adds 1 to the current height. So we do the same here to match.
7443
+ nodes[ 0 ] . node . add_new_pending_payment ( our_payment_hash, Some ( payment_secret) , payment_id, 200_000 ) . unwrap ( ) ;
7403
7444
nodes[ 0 ] . node . send_payment_along_path ( & route. paths [ 0 ] , & route. payment_params , & our_payment_hash, & Some ( payment_secret) , 200_000 , cur_height, payment_id, & None ) . unwrap ( ) ;
7404
7445
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7405
7446
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
@@ -7561,7 +7602,7 @@ mod tests {
7561
7602
& nodes[ 0 ] . node . get_our_node_id ( ) , & route_params, & nodes[ 0 ] . network_graph ,
7562
7603
None , nodes[ 0 ] . logger , & scorer, & random_seed_bytes
7563
7604
) . unwrap ( ) ;
7564
- let ( payment_hash, _ ) = nodes[ 0 ] . node . send_spontaneous_payment ( & route, Some ( payment_preimage) ) . unwrap ( ) ;
7605
+ let payment_hash = nodes[ 0 ] . node . send_spontaneous_payment ( & route, Some ( payment_preimage) ) . unwrap ( ) ;
7565
7606
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7566
7607
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
7567
7608
assert_eq ! ( events. len( ) , 1 ) ;
@@ -7571,7 +7612,7 @@ mod tests {
7571
7612
7572
7613
// Next, attempt a regular payment and make sure it fails.
7573
7614
let payment_secret = PaymentSecret ( [ 43 ; 32 ] ) ;
7574
- nodes[ 0 ] . node . send_payment ( & route, payment_hash, & Some ( payment_secret) ) . unwrap ( ) ;
7615
+ nodes[ 0 ] . node . send_payment_with_id ( & route, payment_hash, & Some ( payment_secret) , PaymentId ( payment_secret . 0 ) ) . unwrap ( ) ;
7575
7616
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7576
7617
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
7577
7618
assert_eq ! ( events. len( ) , 1 ) ;
@@ -7614,7 +7655,7 @@ mod tests {
7614
7655
let _chan = create_chan_between_nodes ( & nodes[ 0 ] , & nodes[ 1 ] , channelmanager:: provided_init_features ( ) , channelmanager:: provided_init_features ( ) ) ;
7615
7656
let route_params = RouteParameters {
7616
7657
payment_params : PaymentParameters :: for_keysend ( payee_pubkey) ,
7617
- final_value_msat : 10000 ,
7658
+ final_value_msat : 10_000 ,
7618
7659
final_cltv_expiry_delta : 40 ,
7619
7660
} ;
7620
7661
let network_graph = nodes[ 0 ] . network_graph ;
@@ -7628,7 +7669,8 @@ mod tests {
7628
7669
7629
7670
let test_preimage = PaymentPreimage ( [ 42 ; 32 ] ) ;
7630
7671
let mismatch_payment_hash = PaymentHash ( [ 43 ; 32 ] ) ;
7631
- let _ = nodes[ 0 ] . node . send_payment_internal ( & route, mismatch_payment_hash, & None , Some ( test_preimage) , None , None ) . unwrap ( ) ;
7672
+ nodes[ 0 ] . node . add_new_pending_payment ( mismatch_payment_hash, None , PaymentId ( mismatch_payment_hash. 0 ) , 10_000 ) . unwrap ( ) ;
7673
+ nodes[ 0 ] . node . send_payment_internal ( & route, mismatch_payment_hash, & None , Some ( test_preimage) , PaymentId ( mismatch_payment_hash. 0 ) , None ) . unwrap ( ) ;
7632
7674
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7633
7675
7634
7676
let updates = get_htlc_update_msgs ! ( nodes[ 0 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -7658,7 +7700,7 @@ mod tests {
7658
7700
let _chan = create_chan_between_nodes ( & nodes[ 0 ] , & nodes[ 1 ] , channelmanager:: provided_init_features ( ) , channelmanager:: provided_init_features ( ) ) ;
7659
7701
let route_params = RouteParameters {
7660
7702
payment_params : PaymentParameters :: for_keysend ( payee_pubkey) ,
7661
- final_value_msat : 10000 ,
7703
+ final_value_msat : 10_000 ,
7662
7704
final_cltv_expiry_delta : 40 ,
7663
7705
} ;
7664
7706
let network_graph = nodes[ 0 ] . network_graph ;
@@ -7673,7 +7715,8 @@ mod tests {
7673
7715
let test_preimage = PaymentPreimage ( [ 42 ; 32 ] ) ;
7674
7716
let test_secret = PaymentSecret ( [ 43 ; 32 ] ) ;
7675
7717
let payment_hash = PaymentHash ( Sha256 :: hash ( & test_preimage. 0 ) . into_inner ( ) ) ;
7676
- let _ = nodes[ 0 ] . node . send_payment_internal ( & route, payment_hash, & Some ( test_secret) , Some ( test_preimage) , None , None ) . unwrap ( ) ;
7718
+ nodes[ 0 ] . node . add_new_pending_payment ( payment_hash, Some ( test_secret) , PaymentId ( payment_hash. 0 ) , 10_000 ) . unwrap ( ) ;
7719
+ nodes[ 0 ] . node . send_payment_internal ( & route, payment_hash, & Some ( test_secret) , Some ( test_preimage) , PaymentId ( payment_hash. 0 ) , None ) . unwrap ( ) ;
7677
7720
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
7678
7721
7679
7722
let updates = get_htlc_update_msgs ! ( nodes[ 0 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -7865,7 +7908,7 @@ pub mod bench {
7865
7908
use chain:: Listen ;
7866
7909
use chain:: chainmonitor:: { ChainMonitor , Persist } ;
7867
7910
use chain:: keysinterface:: { KeysManager , KeysInterface , InMemorySigner } ;
7868
- use ln:: channelmanager:: { self , BestBlock , ChainParameters , ChannelManager , PaymentHash , PaymentPreimage } ;
7911
+ use ln:: channelmanager:: { self , BestBlock , ChainParameters , ChannelManager , PaymentHash , PaymentPreimage , PaymentId } ;
7869
7912
use ln:: features:: { InitFeatures , InvoiceFeatures } ;
7870
7913
use ln:: functional_test_utils:: * ;
7871
7914
use ln:: msgs:: { ChannelMessageHandler , Init } ;
0 commit comments