zebra
zebra copied to clipboard
Allow local peer connections on Regtest
Motivation
This will be needed for the RPC tests and to match zcashd's behaviour on Regtest as closely as possible.
Design
On Regtest:
- Return the configured initial testnet peers without loading the peer cache in
zebra_network::Config.initial_peers()instead of returning an empty set, and - Reject incoming connections and avoid attempting outbound connections with peers outside the local host domain.
How does this relate to #8361 ?
Fixed by https://github.com/ZcashFoundation/zebra/pull/9580.
How does this relate to https://github.com/ZcashFoundation/zebra/issues/8361 ?
#8361 would be cleanup that also allows for disabling all peers on Regtest, or for disabling all or non-local peers on configured Testnets. It wouldn't change the behaviour much, originally we wanted to get rid of any calls to is_default_testnet() or is_regtest() and replace them with fields.