Skip to content

Commit 75b1112

Browse files
committed
Expose ChannelMonitor::get_counterparty_node_id
This fixes an oversight in ac842ed namely that it left users unable to implement their own `ChainMonitor` from outside of the `rust-lightning` crate.
1 parent 36bffb5 commit 75b1112

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,11 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
12141214
self.inner.lock().unwrap().get_cur_holder_commitment_number()
12151215
}
12161216

1217-
pub(crate) fn get_counterparty_node_id(&self) -> Option<PublicKey> {
1217+
/// Gets the `node_id` of the counterparty for this channel.
1218+
///
1219+
/// Will be `None` for channels constructed on LDK versions prior to 0.0.110 and always `Some`
1220+
/// otherwise.
1221+
pub fn get_counterparty_node_id(&self) -> Option<PublicKey> {
12181222
self.inner.lock().unwrap().counterparty_node_id
12191223
}
12201224

0 commit comments

Comments
 (0)