Skip to content

Commit 1dd0526

Browse files
f - Add id_to_peer lock order docs
1 parent 4e2269d commit 1dd0526

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,8 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
762762
/// We should add `counterparty_node_id`s to `MonitorEvent`s, and eventually rely on it in the
763763
/// future. That would make this map redundant, as only the `ChannelManager::per_peer_state` is
764764
/// required to access the channel with the `counterparty_node_id`.
765+
///
766+
/// Locked *after* `channel_state`.
765767
id_to_peer: Mutex<HashMap<[u8; 32], PublicKey>>,
766768

767769
our_network_key: SecretKey,

0 commit comments

Comments
 (0)