-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Simplify ProcessGetBlockData execution by removing send flag #13250
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
Conversation
|
the send flag effectively exits the function whenever it's set to false, this simply actually returns |
|
Yes, I can read the code. But can you actually put that in the PR description? The description goes into the merge commit for example, and is helpful for people investigating the history of code. |
1720603 to
311af6c
Compare
src/net_processing.cpp
Outdated
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.
you should return if pindex is not defined
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.
indeed good catch
311af6c to
660e484
Compare
Setting the send flag to false can be replaced by simply returning.
31214e8 to
b4b6cb4
Compare
|
Travis: |
b4b6cb4 to
261026b
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.
2018
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.
Looks like you're using 2 nodes below, index 0 and 1, is that right?
a1b4bb4 to
dd5ee7f
Compare
| Needs rebase |
| # Setup the p2p connections and start up the network thread. | ||
| self.test_node = self.nodes[0].add_p2p_connection(TestP2PConn()) | ||
|
|
||
| network_thread_start() |
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.
nit: The thread is always running on master. Remove this line.
|
I've rebased and fixed the nit in #13670. |
Setting the send flag to false can be replaced by simply returning.