feat(net): use NodeRecord instead of enode format (#530)

* feat(eth-wire): add timeouts to tests using Geth

* feat(net): use NodeRecord instead of enode format

 * make NodeRecord::new pub instead of pub(crate)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Dan Cline
2022-12-19 17:57:02 -05:00
committed by GitHub
parent ac1c0419d2
commit c53b2bcccb
2 changed files with 7 additions and 9 deletions

View File

@@ -62,9 +62,9 @@ impl NodeRecord {
Self::new(addr, id)
}
/// Creates a new record
/// Creates a new record from a socket addr and peer id.
#[allow(unused)]
pub(crate) fn new(addr: SocketAddr, id: PeerId) -> Self {
pub fn new(addr: SocketAddr, id: PeerId) -> Self {
Self { address: addr.ip(), tcp_port: addr.port(), udp_port: addr.port(), id }
}