test(p2p): cover peer, utils, quic_upgrade, force_direct, bootnode - #666
Merged
Conversation
emlautarom1
requested changes
Aug 25, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
Only one potential issue by relying on the debug format of an external type (a bit too brittle). The deviation is minor considering that at the end of the day the ordering does not matter since it's consumed by a hashset, but we can cleanup the code by matching the exact behavior. Rest are nits.
emlautarom1
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #620
peer.rs— replaced the three#[ignore]dtodo!()stubs with ports of charon'sp2p/peer_test.go:new_tcp_host,new_quic_host,verify_p2p_key_accepts_cluster_keys,peer_id_key. Plusnew_host_without_listen_addrs, charon's own assertion that both node types build from an empty config (outgoing-only nodes).utils.rs— address classifiers with positive/negative multiaddrs,addr_type/addr_protocol,filter_direct_quic_addrs,has_direct_{quic,tcp}_conn, and a verbatim port of charon'sTestFilterAdvertisedAddrstable.quic_upgrade.rs—QuicUpgradeBackofftable test (1 → doubling → 512 cap),should_skipcountdown, per-peer isolation,clear_backoff.force_direct.rs— the forcing path plus every skip condition, including the all-relay guard. Asserts the selected addresses, not just the dialled peer ID.proto.rs— varint framing round-trip across the 1→2 byte prefix boundary, sequential frames, oversize and truncation.bootnode.rs—multi_addr_from_enr_str: port mapping table,EnrNoIp,EnrNoPort, garbage inputs.33 tests added; no
#[ignore]ortodo!()left incrates/p2p.