Add discv5 corrections (#655)
This commit is contained in:
parent
5f8d783776
commit
4b4bc6247d
@ -9,8 +9,8 @@ clap = "2.33.0"
|
||||
hex = "0.3"
|
||||
# rust-libp2p is presently being sourced from a Sigma Prime fork of the
|
||||
# `libp2p/rust-libp2p` repository.
|
||||
libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7" }
|
||||
enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7", features = ["serde"] }
|
||||
libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "f9ac7d542dc3e0b65c5cbbe4f45bfc3382ab2b4d" }
|
||||
enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "f9ac7d542dc3e0b65c5cbbe4f45bfc3382ab2b4d", features = ["serde"] }
|
||||
types = { path = "../../eth2/types" }
|
||||
serde = "1.0.102"
|
||||
serde_derive = "1.0.102"
|
||||
|
@ -91,7 +91,7 @@ impl<TSubstream> Discovery<TSubstream> {
|
||||
debug!(
|
||||
log,
|
||||
"Adding node to routing table";
|
||||
"Node ID" => format!("{}",
|
||||
"node_id" => format!("{}",
|
||||
bootnode_enr.node_id())
|
||||
);
|
||||
discovery.add_enr(bootnode_enr);
|
||||
@ -124,6 +124,7 @@ impl<TSubstream> Discovery<TSubstream> {
|
||||
"enr" => enr.to_base64(),
|
||||
"seq" => enr.seq(),
|
||||
"address" => format!("{:?}", socket));
|
||||
save_enr_to_disc(Path::new(&self.enr_dir), enr, &self.log)
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,7 +267,7 @@ where
|
||||
// query.
|
||||
}
|
||||
Discv5Event::SocketUpdated(socket) => {
|
||||
info!(self.log, "Address updated"; "ip" => format!("{}",socket.ip()), "port" => format!("{}", socket.port()));
|
||||
info!(self.log, "Address updated"; "ip" => format!("{}",socket.ip()), "udp_port" => format!("{}", socket.port()));
|
||||
metrics::inc_counter(&metrics::ADDRESS_UPDATE_COUNT);
|
||||
let mut address = Multiaddr::from(socket.ip());
|
||||
address.push(Protocol::Tcp(self.tcp_port));
|
||||
|
Loading…
Reference in New Issue
Block a user