Skip to content
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

multi: Add bulk import mode. #2782

Merged
merged 2 commits into from
Nov 10, 2021
Merged

Conversation

rstaudt2
Copy link
Member

@rstaudt2 rstaudt2 commented Nov 6, 2021

This adds a bulk import mode that provides a mechanism to indicate that several validation checks can be avoided when bulk importing blocks already known to be valid.

This provides an alternative mechanism to the current solution of passing a BehaviorFlags parameter around, which is inconvenient and makes it harder to determine where flags are being set.

The second commit updates the block importer to enable bulk import mode on the chain rather than passing in the blockchain.BFFastAdd parameter when processing each block.

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and matches what was discussed.

@davecgh davecgh added this to the 1.7.0 milestone Nov 6, 2021
This adds a bulk import mode that provides a mechanism to indicate that
several validation checks can be avoided when bulk importing blocks
already known to be valid.  It will be used by the block importer in a
subsequent commit.

This provides an alternative mechanism to the current solution of
passing a BehaviorFlags parameter around, which is inconvenient and
makes it harder to determine where flags are being set.
This updates the block importer to enable bulk import mode on the chain
rather than passing in the blockchain.BFFastAdd parameter when
processing each block.
This will allow the blockchain.BehaviorFlags parameter to be removed
from the process block function in a subsequent commit.
@davecgh davecgh merged commit 022e587 into decred:master Nov 10, 2021
@rstaudt2 rstaudt2 deleted the bulk-import-mode branch November 22, 2021 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants