0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-14 11:26:09 -05:00
bitcoin-bitcoin-core/src/wallet/test
Andrew Chow 5325a61167
Merge bitcoin/bitcoin#27224: refactor: Remove CAddressBookData::destdata
a5986e82dd refactor: Remove CAddressBookData::destdata (Ryan Ofsky)
5938ad0bdb wallet: Add DatabaseBatch::ErasePrefix method (Ryan Ofsky)

Pull request description:

  This is cleanup that doesn't change external behavior. Benefits of the cleanup are:

  - Removes awkward `StringMap` intermediate representation for wallet address metadata.
  - Simplifies `CWallet`, deals with used address and received request serialization in `walletdb.cpp` instead of higher level wallet code
  - Adds test coverage and documentation

  This PR doesn't change externally observable behavior. Internally, the only change in behavior is that `EraseDestData` deletes rows directly from the database because they are no longer stored in memory. This is more direct and efficient because it uses a single lookup and scan instead of multiple lookups.

  Motivation for this cleanup is making changes like #18550, #18192, #13756 easier to reason about and less likely to result in unintended behavior and bugs

  ---

  This PR is a rebased copy of #18608. For some reason that PR is locked and couldn't be reopened or commented on.

  This PR is an alternative to #27215 with differences described in https://github.com/bitcoin/bitcoin/pull/27215#pullrequestreview-1329028143

ACKs for top commit:
  achow101:
    ACK a5986e82dd
  furszy:
    Code ACK a5986e82

Tree-SHA512: 6bd3e402f1f60263fbd433760bdc29d04175ddaf8307207c4a67d59f6cffa732e176ba57886e02926f7a1615dce0ed9cda36c8cbc6430aa8e5b56934c23f3fe7
2023-05-01 08:16:54 -04:00
..
fuzz coin selection: BnB, don't return selection if exceeds max allowed tx weight 2023-04-05 09:32:39 -03:00
coinselector_tests.cpp refactor: coinselector_tests, unify wallet creation code 2023-04-05 09:32:39 -03:00
db_tests.cpp refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
feebumper_tests.cpp test: Remove unused txmempool include from tests 2022-10-18 14:02:09 +02:00
group_outputs_tests.cpp wallet: single output groups filtering and grouping process 2023-03-06 09:45:40 -03:00
init_test_fixture.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
init_test_fixture.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init_tests.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
ismine_tests.cpp wallet: Add wallet/types.h for simple public enum and struct types 2023-04-11 15:52:25 -04:00
psbt_wallet_tests.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
rpc_util_tests.cpp refactor: move Boost datetime usage to wallet 2022-10-01 11:41:53 +01:00
scriptpubkeyman_tests.cpp refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00
spend_tests.cpp refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00
util.cpp refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00
util.h refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00
wallet_crypto_tests.cpp Move random test util code from setup_common to random 2023-02-06 12:26:04 -08:00
wallet_test_fixture.cpp refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00
wallet_test_fixture.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
wallet_tests.cpp refactor: Remove CAddressBookData::destdata 2023-04-12 05:30:43 -04:00
wallet_transaction_tests.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletdb_tests.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
walletload_tests.cpp refactor: wallet, remove global 'ArgsManager' access 2023-02-15 15:49:45 -03:00