Skip to content

Commit 018a783

Browse files
authored
Merge pull request #1635 from TheBlueMatt/2022-07-accessor-pub
Expose `ChannelMonitor::get_counterparty_node_id`
2 parents a6b0303 + 75b1112 commit 018a783

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)