-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removes loops from getNewBlockTransactions
when creating a new block template the mining manager collects a list of transactions to include in the block. the mining manager iterates over transactions in the mempool, verifies the spends in the transactions, and tracks the total size and total fee from included transactions. we currently iterate over the spends in each transaction twice: once to ensure that two transactions included in the block do not include the same spend and again to verify each spend in the included transaction. we also iterate over the list of included transactions twice after collecting them: once to read the fee from the transaction and again to sum the fees. these changes remove the extra iteration over spends and included transactions. performance gains will likely be neglible.
- Loading branch information
Showing
2 changed files
with
31 additions
and
20 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