Skip to content

Commit b6b52a9

Browse files
committed
Stop serializing peer node ids when forwarding gossip messages
1 parent 2f8fb1f commit b6b52a9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,8 +1480,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
14801480
log_gossip!(self.logger, "Skipping broadcast message to {:?} as its outbound buffer is full", peer.their_node_id);
14811481
continue;
14821482
}
1483-
if let Some(their_node_id) = peer.their_node_id {
1484-
let their_node_id = NodeId::from_pubkey(&their_node_id);
1483+
if let Some(their_node_id) = peer.their_node_id_serialized {
14851484
if their_node_id == msg.contents.node_id_1 || their_node_id == msg.contents.node_id_2 {
14861485
continue;
14871486
}
@@ -1506,8 +1505,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
15061505
log_gossip!(self.logger, "Skipping broadcast message to {:?} as its outbound buffer is full", peer.their_node_id);
15071506
continue;
15081507
}
1509-
if let Some(their_node_id) = peer.their_node_id {
1510-
if NodeId::from_pubkey(&their_node_id) == msg.contents.node_id {
1508+
if let Some(their_node_id) = peer.their_node_id_serialized {
1509+
if their_node_id == msg.contents.node_id {
15111510
continue;
15121511
}
15131512
}

0 commit comments

Comments
 (0)