You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(p2p): read a NodeRecord's fields through one set of helpers
`admit` and `parse_enr` each re-derived the IPv4-over-IPv6 preference and the
secp256k1-to-libp2p key decode. Both answer "who does this record belong to, and
where do we reach them", so letting the two drift would mean the bootnode parser
and the admission filter disagreeing about the same ENR. They now share
`read_ip`/`read_public_key`, next to the `read_quic_port` they already shared.
Three smaller things in the same pass, none of them behaviour changes:
`forget_discovered_peer` was the only inherent `P2PServer` method defined outside
`lib.rs`; every other submodule reaches the actor through a free function taking
`&mut P2PServer`, so `grep 'impl P2PServer'` no longer missed part of its
mutating surface.
The dial loop cloned the peer-table ref and the filter on every tick but only
used them when refilling an empty candidate queue, so the clones now happen
under that condition.
Discovery items nothing outside the crate names drop to `pub(crate)`. Only
`DiscoverySpawnConfig`, `DiscoveryError` and `DEFAULT_DISCOVERY_TARGET_PEERS`
cross into `bin/ethlambda`; the rest read as API with no consumer.
0 commit comments