forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up CQuorumManager::ScanQuorums (#2677)
* Store quorumHash of first mined commitment in evoDb This allows to skip scanning for quorums below this block. * Speed up CQuorumManager::ScanQuorums This does 2 things: 1. Only call HasQuorum for blocks that are potentially a quorumBlockHash These are only blocks which are at index 0 of each DKG interval 2. Stop scanning for quorums when we get below the first block that contained a commitment. If no commitment was ever mined, we bail out immediately. * Return result instead of {} * Remove HasQuorum() call as GetQuorum already does this * Remove unnecessary "if (!qc.IsNull()))" It's already checked at the top of the loop * When necessary, remove DB_FIRST_MINED_COMMITMENT from evoDb in UndoBlock
- Loading branch information
Showing
3 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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