Repository navigation
node: fix onion seednode dialing - #1210
Conversation
6522aa3 to
49e75f3
Compare
| cfg.validate().unwrap(); | ||
| if populated { | ||
| let mut book = AddrMan::new(); | ||
| book.add_addr(format!("{onion}:18444").parse().unwrap()); |
There was a problem hiding this comment.
AddrMan::add_addr drops an onion while onion_reachable is still false, so this save writes an empty peers file and populated == true takes the empty-book dial in run_p2p (the immediate dial_net around the empty-addrman loop). The 10s fallback dial_net never runs, and a revert of only that call stays green. Call set_onion_reachable(true) before add_addr, and fail the run if port 8333 is CONNECTed before ADD_NEXT_SEEDNODE_SECS. The 15s timeout around run_p2p is also shorter than startup plus max_run_secs of 12 once that wait is real.
There was a problem hiding this comment.
Fixed in c448e04. The restart now has a mined tip and an onion-reachable, nonempty address book. The proxy asserts the book peer is tried first and the seed waits for the 10-second window; the run timeout is 45 seconds. Making only the delayed dial IP-only, or bypassing its delay, now fails the regression.
Onion
--seed-nodeaddresses passed config parsing but failed at runtime withinvalid IP address syntax.Use overlay-aware resolution and dialing for both startup and delayed seednode connections. Add a regression covering both paths through a fake SOCKS proxy.