Page MenuHomePhabricator

refactor: move update_* structs from txmempool.h to .cpp file
ClosedPublic

Authored by PiRK on Oct 17 2022, 15:36.

Details

Summary

refactor: use const reference for parents in CTxMemPool::UpdateAncestorsOf

refactor: move update_* structs from txmempool.h to .cpp file

These helpers are exclusively used in txmempool.cpp, hence they
should also be moved there.

Can be reviewed with "--color-moved=dimmed-zebra".

This is a backport of core#23211

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 17 2022, 15:36
sdulfari requested changes to this revision.Oct 17 2022, 20:39
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
src/txmempool.cpp
374 ↗(On Diff #35770)

Missing reference

This revision now requires changes to proceed.Oct 17 2022, 20:39

Tail of the build log:

wallet_dump.py                            | ○ Skipped | 0 s
wallet_encryption.py                      | ○ Skipped | 0 s
wallet_encryption.py --descriptors        | ○ Skipped | 0 s
wallet_groups.py                          | ○ Skipped | 0 s
wallet_hd.py                              | ○ Skipped | 0 s
wallet_hd.py --descriptors                | ○ Skipped | 0 s
wallet_import_rescan.py                   | ○ Skipped | 0 s
wallet_import_with_label.py               | ○ Skipped | 0 s
wallet_importdescriptors.py               | ○ Skipped | 0 s
wallet_importmulti.py                     | ○ Skipped | 0 s
wallet_importprunedfunds.py               | ○ Skipped | 0 s
wallet_importprunedfunds.py --descriptors | ○ Skipped | 0 s
wallet_keypool.py                         | ○ Skipped | 0 s
wallet_keypool_topup.py                   | ○ Skipped | 0 s
wallet_keypool_topup.py --descriptors     | ○ Skipped | 0 s
wallet_labels.py                          | ○ Skipped | 0 s
wallet_labels.py --descriptors            | ○ Skipped | 0 s
wallet_listreceivedby.py                  | ○ Skipped | 0 s
wallet_listsinceblock.py                  | ○ Skipped | 0 s
wallet_listsinceblock.py --descriptors    | ○ Skipped | 0 s
wallet_listtransactions.py                | ○ Skipped | 0 s
wallet_listtransactions.py --descriptors  | ○ Skipped | 0 s
wallet_multiwallet.py                     | ○ Skipped | 0 s
wallet_multiwallet.py --usecli            | ○ Skipped | 0 s
wallet_reorgsrestore.py                   | ○ Skipped | 0 s
wallet_resendwallettransactions.py        | ○ Skipped | 0 s
wallet_send.py                            | ○ Skipped | 0 s
wallet_startup.py                         | ○ Skipped | 0 s
wallet_txn_clone.py                       | ○ Skipped | 0 s
wallet_txn_clone.py --mineblock           | ○ Skipped | 0 s
wallet_txn_doublespend.py                 | ○ Skipped | 0 s
wallet_txn_doublespend.py --mineblock     | ○ Skipped | 0 s
wallet_watchonly.py                       | ○ Skipped | 0 s
wallet_watchonly.py --usecli              | ○ Skipped | 0 s

ALL                                       | ✓ Passed  | 689 s (accumulated) 
Runtime: 138 s

[151/438] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.008s

OK
[152/438] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[177/438] Running seeder test suite
PASSED: seeder test suite
[181/438] Running pow test suite
PASSED: pow test suite
[204/438] Running avalanche test suite
PASSED: avalanche test suite
[207/438] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

rpc_users.py                              | ✓ Passed  | 5 s
rpc_whitelist.py                          | ✓ Passed  | 1 s
tool_wallet.py                            | ✓ Passed  | 4 s
tool_wallet.py --descriptors              | ✓ Passed  | 2 s
wallet_abandonconflict.py                 | ✓ Passed  | 5 s
wallet_address_types.py                   | ✓ Passed  | 13 s
wallet_address_types.py --descriptors     | ✓ Passed  | 8 s
wallet_avoidreuse.py                      | ✓ Passed  | 5 s
wallet_avoidreuse.py --descriptors        | ✓ Passed  | 4 s
wallet_backup.py                          | ✓ Passed  | 29 s
wallet_balance.py                         | ✓ Passed  | 6 s
wallet_balance.py --descriptors           | ✓ Passed  | 8 s
wallet_basic.py                           | ✓ Passed  | 17 s
wallet_coinbase_category.py               | ✓ Passed  | 1 s
wallet_create_tx.py                       | ✓ Passed  | 6 s
wallet_createwallet.py                    | ✓ Passed  | 2 s
wallet_createwallet.py --descriptors      | ✓ Passed  | 3 s
wallet_createwallet.py --usecli           | ✓ Passed  | 2 s
wallet_descriptor.py                      | ✓ Passed  | 7 s
wallet_disable.py                         | ✓ Passed  | 1 s
wallet_dump.py                            | ✓ Passed  | 4 s
wallet_encryption.py                      | ✓ Passed  | 5 s
wallet_encryption.py --descriptors        | ✓ Passed  | 5 s
wallet_groups.py                          | ✓ Passed  | 7 s
wallet_hd.py                              | ✓ Passed  | 6 s
wallet_hd.py --descriptors                | ✓ Passed  | 6 s
wallet_import_rescan.py                   | ✓ Passed  | 5 s
wallet_import_with_label.py               | ✓ Passed  | 1 s
wallet_importdescriptors.py               | ✓ Passed  | 3 s
wallet_importmulti.py                     | ✓ Passed  | 3 s
wallet_importprunedfunds.py               | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors | ✓ Passed  | 2 s
wallet_keypool.py                         | ✓ Passed  | 3 s
wallet_keypool_topup.py                   | ✓ Passed  | 3 s
wallet_keypool_topup.py --descriptors     | ✓ Passed  | 3 s
wallet_labels.py                          | ✓ Passed  | 1 s
wallet_labels.py --descriptors            | ✓ Passed  | 2 s
wallet_listreceivedby.py                  | ✓ Passed  | 5 s
wallet_listsinceblock.py                  | ✓ Passed  | 4 s
wallet_listsinceblock.py --descriptors    | ✓ Passed  | 7 s
wallet_listtransactions.py                | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors  | ✓ Passed  | 3 s
wallet_multiwallet.py                     | ✓ Passed  | 41 s
wallet_multiwallet.py --usecli            | ✓ Passed  | 11 s
wallet_reorgsrestore.py                   | ✓ Passed  | 3 s
wallet_resendwallettransactions.py        | ✓ Passed  | 2 s
wallet_send.py                            | ✓ Passed  | 6 s
wallet_startup.py                         | ✓ Passed  | 2 s
wallet_txn_clone.py                       | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock           | ✓ Passed  | 3 s
wallet_txn_doublespend.py                 | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock     | ✓ Passed  | 3 s
wallet_watchonly.py                       | ✓ Passed  | 1 s
wallet_watchonly.py --usecli              | ✓ Passed  | 1 s

ALL                                       | ✓ Passed  | 1216 s (accumulated) 
Runtime: 243 s

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

rebase. This somehow got accidentaly rebased onto the core#21526 stack (D12282)

This revision is now accepted and ready to land.Oct 18 2022, 17:08