-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Net] Implement poll(), fix race condition and enable p2p_timeouts.py test #2706
[Net] Implement poll(), fix race condition and enable p2p_timeouts.py test #2706
Commits on Jan 20, 2022
-
Net: Fixed a race condition when disabling the network.
This change addresses a race condition where setnetworkactive=false wouldn't always disconnect all peers. Before this change, the following could happen: 1. Thread A -- Begins connecting to a node. 2. Thread B -- Sets kNetworkActive=false and disconnects connected nodes. 3. Thread A -- Finishes connecting and adds node to list of connected nodes. The node that was connected from Thread A remains connected and active, even though kNetworkActive=false. To fix the race, disconnections when kNetworkActive=false are now handled in the main network loop. fixes bitcoin#13038
Configuration menu - View commit details
-
Copy full SHA for dd13d6a - Browse repository at this point
Copy the full SHA dd13d6aView commit details -
Disconnect peers which we do not receive VERACKs from within 60 sec
And enable p2p_timeouts.py test. Coming from btc@2cbd1196b7a07b08cfd91417f2e8ddd09d9f2082 and btc@66f861ade9db108f979a9bdf8d90e8fca028e2a3
Configuration menu - View commit details
-
Copy full SHA for 63c872f - Browse repository at this point
Copy the full SHA 63c872fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2beab2b - Browse repository at this point
Copy the full SHA 2beab2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c35c832 - Browse repository at this point
Copy the full SHA c35c832View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cb0fc7 - Browse repository at this point
Copy the full SHA 0cb0fc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ffca91 - Browse repository at this point
Copy the full SHA 8ffca91View commit details -
Configuration menu - View commit details
-
Copy full SHA for af36d73 - Browse repository at this point
Copy the full SHA af36d73View commit details -
Move GenerateSelectSet logic to private method.
This separates the socket event collection logic from the logic deciding which events we're interested in at all. Adaptation of btc@7e403c0ae705455aa66f7df9a9a99f462fd4e9a8 with further code styling corrections.
Configuration menu - View commit details
-
Copy full SHA for d6884af - Browse repository at this point
Copy the full SHA d6884afView commit details -
Move SocketEvents logic to private method.
This separates the select() logic from the socket handling logic, setting up for a switch to poll().
Configuration menu - View commit details
-
Copy full SHA for 5c10de8 - Browse repository at this point
Copy the full SHA 5c10de8View commit details -
Implement poll() on systems which support it properly.
This eliminates the restriction on maximum socket descriptor number.
Configuration menu - View commit details
-
Copy full SHA for e4571df - Browse repository at this point
Copy the full SHA e4571dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9fc8cc - Browse repository at this point
Copy the full SHA c9fc8ccView commit details