Commit a0d737c
committed
Merge bitcoin/bitcoin#32073: net: Block v2->v1 transport downgrade if !fNetworkActive
6869fb4 net: 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](bitcoin/bitcoin#31633 (comment)) by davidgumberg.
ACKs for top commit:
davidgumberg:
Tested and Reviewed ACK 6869fb4
mabu44:
ACK 6869fb4
stratospher:
ACK 6869fb4. 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:
ACK 6869fb4
Tree-SHA512: 54f596e54c5a6546f2c3fec2609aa8d10dec3adcf1001ca16666d8b374b8d79d64397f46c90d9b3915b4e91a5041b6ced3044fd2a5b4fb4aa7282eb51f61296a1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1912 | 1912 | | |
1913 | 1913 | | |
1914 | 1914 | | |
1915 | | - | |
| 1915 | + | |
| 1916 | + | |
1916 | 1917 | | |
1917 | 1918 | | |
1918 | 1919 | | |
| |||
1934 | 1935 | | |
1935 | 1936 | | |
1936 | 1937 | | |
1937 | | - | |
| 1938 | + | |
1938 | 1939 | | |
1939 | 1940 | | |
1940 | 1941 | | |
| |||
0 commit comments