test: cover ratchet NSR expiry and add I2pDht::has_node
check / check (macos-latest) (push) Failing after 27s
check / check (ubuntu-latest) (push) Failing after 26s
check / check (windows-latest) (push) Failing after 28s

- Add Proposal 144 test for high-concurrency NSR survival, same-tag multi-NSR, and zombie ES expiry
- Add public I2pDht::has_node and assert node presence in the DHT round-trip test
- Reformat DHT announce cooldown call and query match arms in torrent_engine
This commit is contained in:
nandi committed 2026-11-28 19:48:22 -08:00
1 parent 5d97ad8b28
commit d95d4962f4
5 files changed
+202 -24

No files matched your search

+3
View File
@@ -232,7 +232,10 @@ test "I2P DHT Secure Node ID, 54B compact nodes, KRPC round-trips, and XOR routi
assert_true(!@bittorrent.verify_i2p_dht_node_id(dht_a.local_id, dh_a, 6889U))
let id_b = @bittorrent.make_i2p_dht_node_id(dh_b, 6881U, b"rand14bytes_bb")
assert_true(!dht_a.has_node(dh_b, 6881U))
assert_true(dht_a.upsert_node(id_b, dh_b, 6881U, 1000UL))
assert_true(dht_a.has_node(dh_b, 6881U))
assert_true(!dht_a.has_node(dh_b, 6882U))
assert_eq(dht_a.nodes.length(), 1)
// Tampered Node ID must fail Secure Node ID check
assert_true(!dht_a.upsert_node(Bytes::make(20, b'\x77'), dh_b, 6881U, 1001UL))