[Refactor] Decouple peer-processing from block-connection logic#1866
Merged
furszy merged 14 commits intoPIVX-Project:masterfrom Sep 26, 2020
Merged
[Refactor] Decouple peer-processing from block-connection logic#1866furszy merged 14 commits intoPIVX-Project:masterfrom
furszy merged 14 commits intoPIVX-Project:masterfrom
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
Author
|
Yep. fixed. |
1 task
Fuzzbawls
approved these changes
Sep 25, 2020
furszy
added a commit
that referenced
this pull request
Sep 30, 2020
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports bitcoin#8865 and bitcoin#8969, in preparation for the long-awaited net_processing/validation split.