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
server: Use local addr var in version handler. #1256
server: Use local addr var in version handler. #1256
Commits on Sep 21, 2018
-
peer: Add duplicate version message test.
This adds a test to ensure duplicate version messages are rejected. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for 25dfda9 - Browse repository at this point
Copy the full SHA 25dfda9View commit details -
peer: Rework version negotiation.
This modifies the negotiation logic to ensure the callback has the opportunity to see the message before the peer is disconnected and improves the error handling when reading the remote version message. It also has the side effect of ensuring the protocol version is negotiated before sending reject messages with the exception of the first message not being a version message since negotiation is not possible in that case. This is being changed because it is useful for the server to see the message regardless in order to have the opportunity to things such as update the address manager and reject peers that don't have desired services. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for 118f552 - Browse repository at this point
Copy the full SHA 118f552View commit details -
peer: Allow OnVersion callback to reject peer.
This modifies the OnVersion callback to allow a reject message to be returned in which case the message will be sent to the peer and the peer will be disconnected. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for 7b103e2 - Browse repository at this point
Copy the full SHA 7b103e2View commit details -
server: Reject outbound conns to non-full nodes.
This modifies the server connection code to reject outbound peers that do not offer full node services.
Configuration menu - View commit details
-
Copy full SHA for 9151ebc - Browse repository at this point
Copy the full SHA 9151ebcView commit details -
peer: Improve net address service adverts.
This modifies the peer code which deals with advertising service flags via the net address fields of the version message as follows: - For outgoing connections: - Set the local netaddress services to what the local peer supports - Set the remote netaddress services to 0 to indicate no services as they are still unknown - For incoming connections: - Set the local netaddress services to what the local peer supports - Set the remote netaddress services to the what was advertised by the remote peer in its version message
Configuration menu - View commit details
-
Copy full SHA for 4d1e1db - Browse repository at this point
Copy the full SHA 4d1e1dbView commit details -
addrmgr: Expose method to update services.
This exposes a new method named SetServices to the address manager which can be used to update the services for a known address. This will be useful to keep known services up to date. Backported from Decred.
1Configuration menu - View commit details
-
Copy full SHA for 24e2352 - Browse repository at this point
Copy the full SHA 24e2352View commit details -
server: Update addrmgr services on outbound conns.
This adds code to update the address manager services for a known address to the services advertised by peers when they are connected to via an outbound connection. It is only done for outbound connections to help prevent malicious behavior from inbound connections. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for 4b20d4f - Browse repository at this point
Copy the full SHA 4b20d4fView commit details -
server: Use local inbound var in version handler.
This modifies the OnVersion handler for server peers to use a local variable for the inbound status of the peer in order to avoid grabbing the mutex multiple times. While here, it also does some light cleanup. There are no functional changes. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for d2c7892 - Browse repository at this point
Copy the full SHA d2c7892View commit details -
server: Only advertise local addr when current.
This changes the server peers OnVersion handler to only advertise the server as a viable target for inbound connections when the server believes it is close the best known tip. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for c8b9fab - Browse repository at this point
Copy the full SHA c8b9fabView commit details -
server: Use local addr var in version handler.
This modifies the OnVersion handler for server peers to use a local variable for the remote address of the peer in order to avoid grabbing the mutex multiple times. There are no functional changes. Backported from Decred.
Configuration menu - View commit details
-
Copy full SHA for 8c981e4 - Browse repository at this point
Copy the full SHA 8c981e4View commit details