mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
Merge pull request #1635 from TheBlueMatt/2022-07-accessor-pub
Expose `ChannelMonitor::get_counterparty_node_id`
This commit is contained in:
commit
018a78328e
1 changed files with 5 additions and 1 deletions
|
@ -1214,7 +1214,11 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
|
|||
self.inner.lock().unwrap().get_cur_holder_commitment_number()
|
||||
}
|
||||
|
||||
pub(crate) fn get_counterparty_node_id(&self) -> Option<PublicKey> {
|
||||
/// Gets the `node_id` of the counterparty for this channel.
|
||||
///
|
||||
/// Will be `None` for channels constructed on LDK versions prior to 0.0.110 and always `Some`
|
||||
/// otherwise.
|
||||
pub fn get_counterparty_node_id(&self) -> Option<PublicKey> {
|
||||
self.inner.lock().unwrap().counterparty_node_id
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue