bitcoin/src/wallet
Andrew Chow d1e42659bb
Merge bitcoin/bitcoin#25543: wallet: cleanup cached amount and input mine check code
47ea70fbb8 wallet: clean AllInputsMine code, use InputIsMine internally (furszy)
bf310b0e8c wallet: clean InputIsMine code, use GetWalletTx (furszy)
0cb177263c wallet: unify CachedTxGetImmatureCredit and CachedTxGetImmatureWatchOnlyCredit (furszy)
04c6423f7b wallet: remove always true 'fUseCache' arg from CachedTxGetAvailableCredit (furszy)
4f0ca9bff6 wallet: remove always false 'recalculate' arg from GetCachableAmount (furszy)
47b1012677 wallet: remove always true 'fUseCache' from CachedTxGetImmatureWatchOnlyCredit (furszy)
da8f62de2c wallet: remove always true 'fUseCache' from CachedTxGetImmatureCredit (furszy)

Pull request description:

  Another wallet's code garbage collector work. Part of the `mapWallet` encapsulation goal.

  Focused on the following points:

  1) Remove always true `fUseCache` argument from `CachedTxGetImmatureCredit`, `CachedTxGetImmatureWatchOnly` and `CachedTxGetAvailableCredit`.
  2) Remove always false `recalculate` argument from `GetCachableAmount`.
  3) Merge `CachedTxGetImmatureCredit` and `CachedTxGetImmatureWatchOnlyCredit` as they do share the exact same code.
  4) Clean `InputIsMine` method; use `GetWalletTx` instead of access the wallet's map directly.
  5) Clean `AllInputsMine` method; use `InputIsMine` instead of duplicate the exact same code internally.

ACKs for top commit:
  aureleoules:
    re-ACK 47ea70fbb8
  achow101:
    ACK 47ea70fbb8
  theStack:
    re-ACK 47ea70fbb8

Tree-SHA512: e9b64b57de7be6165c5e5552e28cd8a03d4736b0a3707d29d129e3a0a3db6a855c2abf47a24917236060835a297b564a97b66d4c8b178d6bdafb93a12a7c0b40
2022-07-20 16:59:41 -04:00
..
rpc Merge bitcoin/bitcoin#25351: rpc, wallet: Scan mempool after import* - Second attempt 2022-07-18 14:26:21 -04:00
test Merge bitcoin/bitcoin#25543: wallet: cleanup cached amount and input mine check code 2022-07-20 16:59:41 -04:00
bdb.cpp compat: document S_I* defines when building for Windows 2022-07-20 13:10:07 +01:00
bdb.h scripted-diff: replace non-standard fixed width integer types (u_int... -> uint`...) 2022-05-12 15:44:24 +02:00
coincontrol.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coincontrol.h scripted-diff: rename fAllowOtherInputs -> m_allow_other_inputs 2022-06-19 20:32:51 -03:00
coinselection.cpp Revert "bnb: exit selection when best_waste is 0" 2022-06-28 17:27:06 -04:00
coinselection.h Set effective_value when initializing a COutput 2022-05-21 11:25:54 -04:00
context.cpp refactor: use C++11 default initializers 2022-05-17 17:18:58 +01:00
context.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
db.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
db.h Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
dump.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
dump.h Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
external_signer_scriptpubkeyman.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
external_signer_scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.cpp send: refactor CreateTransaction flow to return a BResult<CTransactionRef> 2022-07-08 11:18:35 -03:00
feebumper.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp scripted-diff: Avoid incompatibility with CMake AUTOUIC feature 2022-06-14 10:38:51 +02:00
interfaces.cpp refactor: Return BResult from restoreWallet 2022-07-12 19:20:01 +02:00
ismine.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
load.cpp wallet: Postpone NotifyWalletLoaded() for encrypted wallets 2022-03-30 21:28:53 +02:00
load.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
receive.cpp Merge bitcoin/bitcoin#25543: wallet: cleanup cached amount and input mine check code 2022-07-20 16:59:41 -04:00
receive.h wallet: unify CachedTxGetImmatureCredit and CachedTxGetImmatureWatchOnlyCredit 2022-07-05 10:10:27 -03:00
salvage.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
salvage.h Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
scriptpubkeyman.cpp wallet: refactor GetNewDestination, use BResult 2022-07-08 11:18:35 -03:00
scriptpubkeyman.h wallet: refactor GetNewDestination, use BResult 2022-07-08 11:18:35 -03:00
spend.cpp Merge bitcoin/bitcoin#25218: refactor: introduce generic 'Result' class and connect it to CreateTransaction and GetNewDestination 2022-07-12 13:56:48 +02:00
spend.h Merge bitcoin/bitcoin#25218: refactor: introduce generic 'Result' class and connect it to CreateTransaction and GetNewDestination 2022-07-12 13:56:48 +02:00
sqlite.cpp scripted-diff: Convert global Mutexes to GlobalMutexes 2022-05-21 01:23:23 +10:00
sqlite.h Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
transaction.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
transaction.h wallet: add GetWitnessHash() 2022-02-01 08:44:51 -03:00
wallet.cpp Merge bitcoin/bitcoin#25494: indexes: Stop using node internal types 2022-07-19 21:42:48 +01:00
wallet.h interfaces, refactor: Add more block information to block connected notifications 2022-07-18 13:39:55 -05:00
walletdb.cpp Merge bitcoin/bitcoin#25383: wallet: don't read db every time that a new 'WalletBatch' is created 2022-06-30 18:38:20 +02:00
walletdb.h walletdb: Create a mock database of specific type 2022-05-10 11:54:02 -04:00
wallettool.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
wallettool.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.cpp Use ArgsManager::GetPathArg() for "-walletdir" option 2022-02-09 19:31:23 +02:00
walletutil.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00