fix(disc): use remote addr for NodeRecord on ping (#753)

This commit is contained in:
Matthias Seitz
2023-01-06 16:48:55 +01:00
committed by GitHub
parent 929cde46c4
commit 09bb2d9149

View File

@@ -834,9 +834,9 @@ impl Discv4Service {
fn on_ping(&mut self, ping: Ping, remote_addr: SocketAddr, remote_id: PeerId, hash: H256) {
// update the record
let record = NodeRecord {
address: ping.from.address,
address: remote_addr.ip(),
udp_port: remote_addr.port(),
tcp_port: ping.from.tcp_port,
udp_port: ping.from.udp_port,
id: remote_id,
};