@@ -698,8 +698,8 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
698
698
/// here are failed when we process them as pending-forwardable-HTLCs, and entries are removed
699
699
/// after we generate a PaymentReceived upon receipt of all MPP parts or when they time out.
700
700
///
701
- /// If any of these locks are held at the same time as `pending_inbound_payments`, the lock
702
- /// order requires that these locks are taken prior to `pending_inbound_payments` :
701
+ /// If any of these locks are held at the same time, they must be acquired prior and in the
702
+ /// following order :
703
703
/// * `channel_state`
704
704
/// * `forward_htlcs`
705
705
/// * `per_peer_state`
@@ -716,8 +716,8 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
716
716
///
717
717
/// See `PendingOutboundPayment` documentation for more info.
718
718
///
719
- /// If any of these locks are held at the same time as `pending_outbound_payments`, the lock
720
- /// order requires that these locks are taken prior to `pending_outbound_payments` :
719
+ /// If any of these locks are held at the same time as, they must be acquired prior and in the
720
+ /// following order :
721
721
/// * `channel_state`
722
722
/// * `forward_htlcs`
723
723
/// * `per_peer_state`
@@ -733,7 +733,7 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
733
733
/// Note that no consistency guarantees are made about the existence of a channel with the
734
734
/// `short_channel_id` here, nor the `short_channel_id` in the `PendingHTLCInfo`!
735
735
///
736
- /// If also holding `channel_state` lock, must lock `channel_state` prior to `forward_htlcs `.
736
+ /// Locked *after* `channel_state`.
737
737
#[ cfg( test) ]
738
738
pub ( super ) forward_htlcs : Mutex < HashMap < u64 , Vec < HTLCForwardInfo > > > ,
739
739
#[ cfg( not( test) ) ]
@@ -799,22 +799,22 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
799
799
/// operate on the inner value freely. Sadly, this prevents parallel operation when opening a
800
800
/// new channel.
801
801
///
802
- /// If any of these locks are held at the same time as `per_peer_state`, the lock order
803
- /// requires that these locks are taken prior to `per_peer_state` :
802
+ /// If any of these locks are held at the same time, they must be acquired prior and in the
803
+ /// following order :
804
804
/// * `channel_state`
805
805
/// * `forward_htlcs`
806
806
per_peer_state : RwLock < HashMap < PublicKey , Mutex < PeerState > > > ,
807
807
808
- /// If any of these locks are held at the same time as `pending_events`, the lock order
809
- /// requires that these locks are taken prior to `pending_events` :
808
+ /// If any of these locks are held at the same time, they must be acquired prior and in the
809
+ /// following order :
810
810
/// * `channel_state`
811
811
/// * `forward_htlcs`
812
812
/// * `per_peer_state`
813
813
/// * `pending_inbound_payments`
814
814
/// * `pending_outbound_payments`
815
815
pending_events : Mutex < Vec < events:: Event > > ,
816
- /// If any of these locks are held at the same time as `pending_background_events`, the lock
817
- /// order requires that these locks are taken prior to `pending_background_events` :
816
+ /// If any of these locks are held at the same time, they must be acquired prior and in the
817
+ /// following order :
818
818
/// * `channel_state`
819
819
/// * `forward_htlcs`
820
820
/// * `per_peer_state`
0 commit comments