Skip to content

Commit aab04d6

Browse files
committed
f LDK: Account for message handler taking PublicKeys by value
1 parent e6a311a commit aab04d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/message_handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ where
6363
L::Target: Logger,
6464
{
6565
fn handle_custom_message(
66-
&self, msg: Self::CustomMessage, sender_node_id: &PublicKey,
66+
&self, msg: Self::CustomMessage, sender_node_id: PublicKey,
6767
) -> Result<(), lightning::ln::msgs::LightningError> {
6868
match self {
6969
Self::Ignoring => Ok(()), // Should be unreachable!() as the reader will return `None`
@@ -91,7 +91,7 @@ where
9191
}
9292
}
9393

94-
fn provided_init_features(&self, their_node_id: &PublicKey) -> InitFeatures {
94+
fn provided_init_features(&self, their_node_id: PublicKey) -> InitFeatures {
9595
match self {
9696
Self::Ignoring => InitFeatures::empty(),
9797
Self::Liquidity { liquidity_source, .. } => {
@@ -101,7 +101,7 @@ where
101101
}
102102

103103
fn peer_connected(
104-
&self, their_node_id: &PublicKey, msg: &lightning::ln::msgs::Init, inbound: bool,
104+
&self, their_node_id: PublicKey, msg: &lightning::ln::msgs::Init, inbound: bool,
105105
) -> Result<(), ()> {
106106
match self {
107107
Self::Ignoring => Ok(()),
@@ -111,7 +111,7 @@ where
111111
}
112112
}
113113

114-
fn peer_disconnected(&self, their_node_id: &PublicKey) {
114+
fn peer_disconnected(&self, their_node_id: PublicKey) {
115115
match self {
116116
Self::Ignoring => {},
117117
Self::Liquidity { liquidity_source, .. } => {

0 commit comments

Comments
 (0)