bitcoin/src/wallet
Andrew Chow 1dec90d95b
Merge bitcoin/bitcoin#25526: wallet: avoid double keypool TopUp() call on descriptor wallets
bfb9b94ebe wallet: remove duplicate descriptor type check in GetNewDestination (furszy)
76b982a4a5 wallet: remove unused `nAccountingEntryNumber` field (furszy)
599ff5adfc wallet: avoid double TopUp() calls on descriptor wallets (furszy)

Pull request description:

  Found it while was digging over a `getnewaddress` timeout on the functional test suite.

  ### Context:

  We are calling `TopUp()` twice in the following flows for descriptor wallets:

  A) `CWallet::GetNewDestination`:
     1) Calls spk_man->TopUp()
     2) Calls spk_man->GetNewDestination() --> which, after the basic script checks, calls TopUp() again.

  B) `CWallet::GetReservedDestination`:
     1) Calls spk_man->TopUp()
     2) Calls spk_man->GetReservedDestination() --> which calls to GetNewDestination (which calls to TopUp again).

  ### Changes:

  Move `TopUp()` responsibility from the wallet class to each scriptpubkeyman.
  So each spkm can decide to call it or not after perform the basic checks
  for the new destination request.

  Aside from that, remove the unused `nAccountingEntryNumber` wallet field. And a duplicated descriptor type check in `GetNewDestination`

ACKs for top commit:
  aureleoules:
    re-ACK bfb9b94ebe.
  achow101:
    ACK bfb9b94ebe
  theStack:
    Code-review ACK bfb9b94ebe

Tree-SHA512: 3ab73f37729e50d6c6a4434f676855bc1fb404619d63c03e5b06ce61c292c09c59d64cb1aa3bd9277b06f26988956991d62c90f9d835884f41ed500b43a12058
2022-10-13 11:27:38 -04:00
..
rpc Merge bitcoin/bitcoin#26205: wallet: #25768 follow ups 2022-10-13 12:09:44 +08:00
test Merge bitcoin/bitcoin#26203: wallet: Use correct effective value when checking target 2022-10-04 09:57:17 +01:00
bdb.cpp Merge bitcoin/bitcoin#25499: Use steady clock for all millis bench logging 2022-09-16 11:10:15 +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 wallet: use GetChange() when computing waste 2022-08-15 09:35:20 +02:00
coinselection.h wallet: use GetChange() when computing waste 2022-08-15 09:35:20 +02: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 Use HashWriter where possible 2022-07-20 15:34:36 +02:00
dump.h Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
external_signer_scriptpubkeyman.cpp GetExternalSigner(): fail if multiple signers are found 2022-06-09 20:34:46 +02:00
external_signer_scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.cpp Merge bitcoin/bitcoin#25775: docs: remove non-signaling mentions of BIP125 2022-08-22 10:35:26 +01:00
feebumper.h bumpfee: be able to bump fee of a tx with external inputs 2022-08-19 11:27:01 -04:00
fees.cpp Remove ::dustRelayFee 2022-08-02 15:26:49 +02: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 Merge bitcoin/bitcoin#26005: Wallet: Fix error handling (copy_file failure in RestoreWallet, and in general via interfaces) 2022-09-19 16:10:47 +01:00
ismine.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
load.cpp wallet: trigger MaybeResendWalletTxs() every minute 2022-08-25 14:29:25 +01:00
load.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
receive.cpp Merge bitcoin/bitcoin#25707: refactor: Make const references to avoid unnecessarily copying objects and enable two clang-tidy checks 2022-08-19 17:11:06 +02:00
receive.h Merge bitcoin/bitcoin#25504: RPC: allow to track coins by parent descriptors 2022-08-16 13:08:05 -04: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 Merge bitcoin/bitcoin#25526: wallet: avoid double keypool TopUp() call on descriptor wallets 2022-10-13 11:27:38 -04:00
scriptpubkeyman.h Implement LegacyScriptPubKeyMan::DeleteRecords 2022-08-26 13:14:51 -04:00
spend.cpp wallet: Use correct effective value when checking target 2022-10-02 01:34:25 +02:00
spend.h wallet: switch to new shuffle, erase, push_back 2022-08-10 15:19:31 +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: Deduplicate Resend and ReacceptWalletTransactions 2022-08-29 12:38:06 -04:00
wallet.cpp Merge bitcoin/bitcoin#25526: wallet: avoid double keypool TopUp() call on descriptor wallets 2022-10-13 11:27:38 -04:00
wallet.h Merge bitcoin/bitcoin#25526: wallet: avoid double keypool TopUp() call on descriptor wallets 2022-10-13 11:27:38 -04:00
walletdb.cpp wallet: bugfix, load wallet with an unknown descriptor cause fatal error 2022-09-09 15:35:04 -03:00
walletdb.h wallet: bugfix, load wallet with an unknown descriptor cause fatal error 2022-09-09 15:35:04 -03:00
wallettool.cpp Merge bitcoin/bitcoin#25784: Wallet: Document expectations for AddWalletFlags (now InitWalletFlags) correctly 2022-08-19 12:12:27 -04: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 Implement LegacyScriptPubKeyMan::MigrateToDescriptor 2022-08-25 16:25:53 -04:00