mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
6869fb4170net: Block v2->v1 transport downgrade if !CConnman::fNetworkActive (Hodlinator) Pull request description: We might have just set `CNode::fDisconnect` in the first loop because of `!CConnman::fNetworkActive`. Attempting to reconnect using v1 transport just because `fNetworkActive` was set to `false` at the "right" stage in the v2 handshake does not make sense. Issue [discovered](https://github.com/bitcoin/bitcoin/pull/31633#discussion_r1930908304) by davidgumberg. ACKs for top commit: davidgumberg: Tested and Reviewed ACK6869fb4170mabu44: ACK6869fb4170stratospher: ACK6869fb4. I've reviewed the code but don't have strong preference for this branch vs master since only functional change is just a single log not being printed in a low probability scenario (we happen to be attempting v2 connection when P2P network activity is being turned off). vasild: ACK6869fb4170Tree-SHA512: 54f596e54c5a6546f2c3fec2609aa8d10dec3adcf1001ca16666d8b374b8d79d64397f46c90d9b3915b4e91a5041b6ced3044fd2a5b4fb4aa7282eb51f61296a
154 KiB
154 KiB