elements/src/wallet
MarcoFalke 0f204dd3f2
Merge #18727: test: Add CreateWalletFromFile test
7918c1b019 test: Add CreateWalletFromFile test (Russell Yanofsky)

Pull request description:

  Add unit test calling CreateWalletFromFile, which isn't currently called from other unit tests, with some basic checks to make sure it rescans and registers for notifications correctly.

  Motivation for this change was to try to write a test that would fail without the early `handleNotifications` call in ef8c6ca60767cac589d98ca57ee33179608ccda8 from https://github.com/bitcoin/bitcoin/pull/16426, but succeed with it:

  ef8c6ca607/src/wallet/wallet.cpp (L3978-L3986)

  However, writing a full test for the race condition that call prevents isn't possible without the locking changes from #16426. So this PR just adds as much test coverage as is possible now.

  This new test is also useful for https://github.com/bitcoin/bitcoin/pull/15719, since it detects the stale notifications.transactionAddedToMempool notifications that PR eliminates.

ACKs for top commit:
  MarcoFalke:
    ACK 7918c1b019
  jonatack:
    ACK 7918c1b019

Tree-SHA512: 44035aee698ecb722c6039d061d8fac2011e9da0b314e4aff19be1d610b53cacff99016b34d6b84669bb3b61041b2318d9d8e3363658f087802ae4aa36ca17b8
2020-04-29 15:23:39 -04:00
..
test test: Add CreateWalletFromFile test 2020-04-26 20:23:05 -04:00
coincontrol.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
coincontrol.h refactor: Nuke coincontrol circular dependency 2019-11-23 08:30:03 +02:00
coinselection.cpp bnb: exit selection when best_waste is 0 2020-03-04 16:35:15 -05:00
coinselection.h amount: Move CAmount CENT to unit test header 2018-09-17 14:34:56 -04:00
crypter.cpp Fix occurences of c_str() used with size() to data() 2019-10-28 13:41:45 +01:00
crypter.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
db.cpp Merge #18241: wallet/refactor: refer to CWallet immutably when possible 2020-03-07 07:24:54 +08:00
db.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
feebumper.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
feebumper.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
fees.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
fees.h Remove uses of fee globals in wallet code 2019-02-22 15:43:02 -04:00
init.cpp Merge #15761: Replace -upgradewallet startup option with upgradewallet RPC 2020-04-19 07:06:42 -04:00
ismine.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
load.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
load.h wallet: Fix documentation around WalletParameterInteraction 2019-09-03 14:10:25 -04:00
rpcdump.cpp Merge #18777: wallet: Recommend absolute path for dumpwallet 2020-04-27 18:02:52 -04:00
rpcwallet.cpp add importdescriptors RPC and tests for native descriptor wallets 2020-04-23 13:59:48 -04:00
rpcwallet.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
scriptpubkeyman.cpp add importdescriptors RPC and tests for native descriptor wallets 2020-04-23 13:59:48 -04:00
scriptpubkeyman.h add importdescriptors RPC and tests for native descriptor wallets 2020-04-23 13:59:48 -04:00
wallet.cpp Merge #18038: P2P: Mempool tracks locally submitted transactions to improve wallet privacy 2020-04-29 16:32:37 +08:00
wallet.h add importdescriptors RPC and tests for native descriptor wallets 2020-04-23 13:59:48 -04:00
walletdb.cpp Add IsLegacy to CWallet so that the GUI knows whether to show watchonly 2020-04-23 13:59:48 -04:00
walletdb.h Implement TopUp in DescriptorScriptPubKeyMan 2020-04-23 13:59:48 -04:00
wallettool.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
wallettool.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
walletutil.cpp Correctly check for default wallet 2020-04-23 13:59:48 -04:00
walletutil.h Introduce WalletDescriptor class 2020-04-23 13:25:50 -04:00