refactor(core-blockchain): block processing#1953
Merged
faustbrian merged 17 commits intoArkEcosystem:developfrom Jan 10, 2019
spkjp:refactor-block-processing
Merged
refactor(core-blockchain): block processing#1953faustbrian merged 17 commits intoArkEcosystem:developfrom spkjp:refactor-block-processing
faustbrian merged 17 commits intoArkEcosystem:developfrom
spkjp:refactor-block-processing
Conversation
… small Handler classes
Codecov Report
@@ Coverage Diff @@
## develop #1953 +/- ##
===========================================
+ Coverage 38.6% 39.24% +0.64%
===========================================
Files 354 363 +9
Lines 7764 7840 +76
Branches 1172 1168 -4
===========================================
+ Hits 2997 3077 +80
+ Misses 4752 4748 -4
Partials 15 15
Continue to review full report at Codecov.
|
faustbrian
approved these changes
Jan 10, 2019
Contributor
|
I would leave the skipped tests in for now, in case we want to enable them again, otherwise we can remove them soon. |
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.
Proposed changes
This PR refactors the current block processing logic to streamline the handling of bad blocks
and make it overall more robust and easier to follow.
Short summary:
BlockProcessorclassBlockHandlers, used byBlockProcessorsomethingi.e. reverting the last downloaded block, starting a fork or chaining a blockBlockHandlerby overwritingexecuteForging still works on my delegate and tests are all green . Though I had to disable two tests for now -
acceptChainedBlockandmanageUnchainedBlock. The functionality is implicitely tested by other tests and the tests don't make sense in their current form anymore. Remove them?Any feedback is welcome.
Types of changes
Checklist