-
Notifications
You must be signed in to change notification settings - Fork 121
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
Ap/join network sync improvement zend 616 #586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup. LGTM, thanks.
281ba35
to
d17c746
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is fine to me, it should definitely solve our sync errors during test and that's great.
I left few minor comments; probably only the one related to PushMessage
in main.cpp
really to be addressed, the others can be skipped.
5acd8a5
to
7dda8a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of minuscule comments, feel free to ignore. Looks good to me, thanks!
f2c361b
to
0aad1dc
Compare
All net messages strings / const char* have been replaced with equivalent instances uniquely defined in NetMsgType namespace
This commit adds maps mapSendBytesPerMsgType and mapRecvBytesPerMsgType in CNode class, to keep track of how many messages o f a specific kind and how many bytes for each message type a peer exchanges.
…sage This commit updates getpeerinfo rpc command by adding fields bytessent_per_msg and bytesrecv_per_msg that contains the amount of data (in bytes) exchaned with a peer, divided by message type
This commit changes the logic of Python test framework's connect_nodes() function. It now waits for the two peers to receive the 'verack' version before exiting, preventing race conditions such as two nodes exchanging messages before the actual connection handshake has been completed
0aad1dc
to
c6112c5
Compare
Python tests of this PR relies on changes introduced in PR #586, which is not included in this release. This commit fixes the issue temporarily.
Python tests of this PR relies on changes introduced in PR #586, which is not included in this release. This commit fixes the issue temporarily.
This PR changes the logic behind the connection of two zend nodes in the test framework. In particular, we introduced a check that explicitly waits for the two nodes to exchange their respective
verack
messages before continuing with the test. This prevents racing conditions such as requesting data to a node before the connection takes place.For this purpose, we enriched the
getpeerinfo()
RPC command with two new fields:bytessent_per_msg
andbytesrecv_per_msg
, two dictionaries which collect the amount of sent and received data, divided by message category.This PR also modifies a few tests that were sporadically failing because of that racing condition.
Finally, we fixed
mempool_coinbase_spends
test which lacked proper synchronization between the two nodes.