[tests] speed up of tx_validationcache_tests by reusing of CTransaction.#13404
Merged
maflcko merged 1 commit intobitcoin:masterfrom Jun 7, 2018
lucash-dev:speedup-tx_validationcache_tests
Merged
[tests] speed up of tx_validationcache_tests by reusing of CTransaction.#13404maflcko merged 1 commit intobitcoin:masterfrom lucash-dev:speedup-tx_validationcache_tests
maflcko merged 1 commit intobitcoin:masterfrom
lucash-dev:speedup-tx_validationcache_tests
Conversation
Empact
reviewed
Jun 6, 2018
src/test/txvalidationcache_tests.cpp
Outdated
Contributor
There was a problem hiding this comment.
Could be const or a const reference.
Member
There was a problem hiding this comment.
Agree that this should be a const ref
The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction.
Member
|
utACK ebebedc |
maflcko
pushed a commit
that referenced
this pull request
Jun 7, 2018
… of CTransaction. ebebedc speed up of tx_validationcache_tests by reusing of CTransaction. ([email protected]) Pull request description: The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction. Run-time results: ``` Before: 6.7s After: 5.5s -------------- Saved: 1.2s ``` This PR was split from #13050. Also, see #10026. Tree-SHA512: 61fb81972a08299085a7d3d0060485b265aefc7a4f82ab548e5f94371c8643cfb97bf0ef34f4e1211bf853d0217fa1c3338e4117f36fda1b37d203f690e86d60
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jun 28, 2021
…reusing of CTransaction. ebebedc speed up of tx_validationcache_tests by reusing of CTransaction. ([email protected]) Pull request description: The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction. Run-time results: ``` Before: 6.7s After: 5.5s -------------- Saved: 1.2s ``` This PR was split from bitcoin#13050. Also, see bitcoin#10026. Tree-SHA512: 61fb81972a08299085a7d3d0060485b265aefc7a4f82ab548e5f94371c8643cfb97bf0ef34f4e1211bf853d0217fa1c3338e4117f36fda1b37d203f690e86d60
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction.
Run-time results:
This PR was split from #13050. Also, see #10026.