net: keep unreachable I2P out of addrman - #680
Merged
Merged
Conversation
Core stores an I2P addrv2 row only when -i2psam made the network reachable. Without that, p2p_addrv2_relay expects getnodeaddresses network=i2p to be empty even though the row is still relayed.
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.
Summary
Nightly
core-functionalfailed inp2p_addrv2_relay.py: after an addrv2 message that includes one I2P address,getnodeaddresses(count=0, network="i2p")was 1. Core keeps that count at 0 unless-i2psammade I2P reachable. The row is still relayed; it is just not stored.--i2p-samnow sets that reachability before the SAM session comes up, so a configured router still learns port-0 I2P destinations.Test plan
cargo test -p rbitcoin-net --lib learn_addrv2(drops until reachable; keeps port 0 once reachable)