-
Notifications
You must be signed in to change notification settings - Fork 38.7k
tx pool: Avoid passing redundant hash into addUnchecked (scripted-diff) #13792
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
Conversation
5bbe638 to
8c9d589
Compare
Note to reviewers: This pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Looks like the scripted-diff is failing because of the other whitespace/formatting changes also included in 8c9d589. |
21a6366 to
376e27b
Compare
-BEGIN VERIFY SCRIPT- git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g' -END VERIFY SCRIPT-
376e27b to
fa58777
Compare
0e97ce7 to
fa58777
Compare
|
This is split off of #13804, but not required. So if people hate this kind of refactoring, I am happy to drop it. |
|
Concept ACK |
|
utACK fa58777 |
|
utACK fe5c497 |
… (scripted-diff) fa58777 scripted-diff: Remove unused first argument to addUnchecked (MarcoFalke) fe5c497 tx pool: Use the entry's hash instead of the one passed to addUnchecked (MarcoFalke) ddd395f Mark CTxMemPoolEntry members that should not be modified const (MarcoFalke) Pull request description: Several years ago the transaction hash was not cached. For optimization the hash was instead passed into `addUnchecked` to avoid re-calculating it. See f77654a Passing in the hash is now redundant and the argument can safely be removed. Tree-SHA512: 0206b65c7a014295f67574120e8c5397bf1b1bd70c918ae1360ab093676f7f89a6f084fd2c7000a141baebfe63fe6f515559e38c4ac71810ba64f949f9c0467f
Update auxpow_tests.cpp for the upstream refactoring in bitcoin/bitcoin#13792.
tx pool: Use the entry's hash instead of the one passed to addUnchecked Mark CTxMemPoolEntry members that should not be modified const
Several years ago the transaction hash was not cached. For optimization the hash was instead passed into
addUncheckedto avoid re-calculating it. See f77654aPassing in the hash is now redundant and the argument can safely be removed.