-
Notifications
You must be signed in to change notification settings - Fork 717
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
[Refactor] Decouple peer-processing from block-connection logic #1866
[Refactor] Decouple peer-processing from block-connection logic #1866
Conversation
whoop whoop!, nice work 😄 . Obvious concept ACK, damn that took a while to get to this point but we are finally here. |
check travis macOS job, seems to be failing due a recursive mutex lock. |
In anticipation of making all the callbacks out of block processing flow through it. Note that vHashes will always have something in it since pindexFork != pindexNewTip.
>>> based on bitcoin/bitcoin@fef1010 This adds a new CValidationInterface subclass, defined in main.h, to receive notifications of UpdatedBlockTip and use that to push blocks to peers, instead of doing it directly from ActivateBestChain.
UnloadBlockIndex is only used during init if we end up reindexing to clear our block state so that we can start over. However, at that time no connections have been brought up as CConnman hasn't been started yet, so all of the network processing state logic is empty when its called. Additionally, the initialization of the recentRejects set is moved to InitPeerLogic.
951d261
to
94cc49f
Compare
Yep. fixed. |
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.
ACK 94cc49f
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.
Looking good, ACK 94cc49f and merging..
…main.{h,cpp}) 34ad9d5 [Cleanup] Fix cs_main in net_processing (random-zebra) f798b5f Rename the remaining main.{h,cpp} to validation.{h,cpp} (random-zebra) be294cb [Validation] Move Block spam filter to net_processing (random-zebra) 520ae4b Move network-msg-processing code out of main to its own file (random-zebra) 9b894ed [Validation] save mapBlockSource in ProcessMessage (not ProcessNewBlock) (random-zebra) 2f37add Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo) Pull request description: Finally split main.{h,cpp} file in net_processing.{h,cpp}/validation.{h,cpp} as per upstream (bitcoin#9260) 🎉 Built on top of - [x] #1866 ACKs for top commit: Fuzzbawls: ACK 34ad9d5 furszy: ACK 34ad9d5 with a minor nit. Tree-SHA512: 18b1457759d8684344c271236c63e1d9c83ed6e651da3efd2a7d8ab5af577fdfa85fd0f08107a26f952c3ae5da0793ebb77a2c5a710c65161f5132178db931e3
Backports bitcoin#8865 and bitcoin#8969, in preparation for the long-awaited net_processing/validation split.