@@ -452,7 +452,7 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
452
452
/// after reloading from disk while replaying blocks against ChannelMonitors.
453
453
///
454
454
/// Locked *after* channel_state.
455
- outbound_pending_payments : Mutex < HashSet < [ u8 ; 32 ] > > ,
455
+ pending_outbound_payments : Mutex < HashSet < [ u8 ; 32 ] > > ,
456
456
457
457
our_network_key : SecretKey ,
458
458
our_network_pubkey : PublicKey ,
@@ -925,7 +925,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
925
925
pending_msg_events : Vec :: new ( ) ,
926
926
} ) ,
927
927
pending_inbound_payments : Mutex :: new ( HashMap :: new ( ) ) ,
928
- outbound_pending_payments : Mutex :: new ( HashSet :: new ( ) ) ,
928
+ pending_outbound_payments : Mutex :: new ( HashSet :: new ( ) ) ,
929
929
930
930
our_network_key : keys_manager. get_node_secret ( ) ,
931
931
our_network_pubkey : PublicKey :: from_secret_key ( & secp_ctx, & keys_manager. get_node_secret ( ) ) ,
@@ -1492,7 +1492,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1492
1492
let onion_packet = onion_utils:: construct_onion_packet ( onion_payloads, onion_keys, prng_seed, payment_hash) ;
1493
1493
1494
1494
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
1495
- assert ! ( self . outbound_pending_payments . lock( ) . unwrap( ) . insert( session_priv_bytes) ) ;
1495
+ assert ! ( self . pending_outbound_payments . lock( ) . unwrap( ) . insert( session_priv_bytes) ) ;
1496
1496
1497
1497
let err: Result < ( ) , _ > = loop {
1498
1498
let mut channel_lock = self . channel_state . lock ( ) . unwrap ( ) ;
@@ -2247,7 +2247,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2247
2247
if {
2248
2248
let mut session_priv_bytes = [ 0 ; 32 ] ;
2249
2249
session_priv_bytes. copy_from_slice ( & session_priv[ ..] ) ;
2250
- self . outbound_pending_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2250
+ self . pending_outbound_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2251
2251
} {
2252
2252
self . pending_events . lock ( ) . unwrap ( ) . push (
2253
2253
events:: Event :: PaymentFailed {
@@ -2285,7 +2285,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2285
2285
if {
2286
2286
let mut session_priv_bytes = [ 0 ; 32 ] ;
2287
2287
session_priv_bytes. copy_from_slice ( & session_priv[ ..] ) ;
2288
- !self . outbound_pending_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2288
+ !self . pending_outbound_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2289
2289
} {
2290
2290
return ;
2291
2291
}
@@ -2522,7 +2522,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2522
2522
if {
2523
2523
let mut session_priv_bytes = [ 0 ; 32 ] ;
2524
2524
session_priv_bytes. copy_from_slice ( & session_priv[ ..] ) ;
2525
- self . outbound_pending_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2525
+ self . pending_outbound_payments . lock ( ) . unwrap ( ) . remove ( & session_priv_bytes)
2526
2526
} {
2527
2527
let mut pending_events = self . pending_events . lock ( ) . unwrap ( ) ;
2528
2528
pending_events. push ( events:: Event :: PaymentSent {
@@ -4504,9 +4504,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> Writeable f
4504
4504
pending_payment. write ( writer) ?;
4505
4505
}
4506
4506
4507
- let outbound_pending_payments = self . outbound_pending_payments . lock ( ) . unwrap ( ) ;
4508
- ( outbound_pending_payments . len ( ) as u64 ) . write ( writer) ?;
4509
- for session_priv in outbound_pending_payments . iter ( ) {
4507
+ let pending_outbound_payments = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
4508
+ ( pending_outbound_payments . len ( ) as u64 ) . write ( writer) ?;
4509
+ for session_priv in pending_outbound_payments . iter ( ) {
4510
4510
session_priv. write ( writer) ?;
4511
4511
}
4512
4512
@@ -4749,10 +4749,10 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
4749
4749
}
4750
4750
}
4751
4751
4752
- let outbound_pending_payments_count : u64 = Readable :: read ( reader) ?;
4753
- let mut outbound_pending_payments : HashSet < [ u8 ; 32 ] > = HashSet :: with_capacity ( cmp:: min ( outbound_pending_payments_count as usize , MAX_ALLOC_SIZE /32 ) ) ;
4754
- for _ in 0 ..outbound_pending_payments_count {
4755
- if !outbound_pending_payments . insert ( Readable :: read ( reader) ?) {
4752
+ let pending_outbound_payments_count : u64 = Readable :: read ( reader) ?;
4753
+ let mut pending_outbound_payments : HashSet < [ u8 ; 32 ] > = HashSet :: with_capacity ( cmp:: min ( pending_outbound_payments_count as usize , MAX_ALLOC_SIZE /32 ) ) ;
4754
+ for _ in 0 ..pending_outbound_payments_count {
4755
+ if !pending_outbound_payments . insert ( Readable :: read ( reader) ?) {
4756
4756
return Err ( DecodeError :: InvalidValue ) ;
4757
4757
}
4758
4758
}
@@ -4776,7 +4776,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
4776
4776
pending_msg_events : Vec :: new ( ) ,
4777
4777
} ) ,
4778
4778
pending_inbound_payments : Mutex :: new ( pending_inbound_payments) ,
4779
- outbound_pending_payments : Mutex :: new ( outbound_pending_payments ) ,
4779
+ pending_outbound_payments : Mutex :: new ( pending_outbound_payments ) ,
4780
4780
4781
4781
our_network_key : args. keys_manager . get_node_secret ( ) ,
4782
4782
our_network_pubkey : PublicKey :: from_secret_key ( & secp_ctx, & args. keys_manager . get_node_secret ( ) ) ,
0 commit comments