bitcoin/src/wallet
Ryan Ofsky d724bb5291
Merge bitcoin/bitcoin#28609: wallet: Reload watchonly and solvables wallets after migration
4814e4063e test: Check tx metadata is migrated to watchonly (Andrew Chow)
d616d30ea5 wallet: Reload watchonly and solvables wallets after migration (Andrew Chow)
118f2d7d70 wallet: Copy all tx metadata to watchonly wallet (Andrew Chow)
9af87cf348 test: Check that a failed wallet migration is cleaned up (Andrew Chow)

Pull request description:

  Some incomplete/incorrect state as a result of migration can be mitigated/cleaned up by simply restarting the migrated wallets. We already do this for a wallet when it is migrated, but we do not for the new watchonly and solvables wallets that may be created. This PR introduces this behavior, in addition to creating those wallets initially without an attached chain.

  While implementing this, I noticed that not all `CWalletTx` metadata was being copied over to the watchonly wallet and so some data, such as time received, was being lost. This PR fixes this as a side effect of not having a chain attached to the watchonly wallet. A test has also been added.

ACKs for top commit:
  ishaanam:
    light code review ACK 4814e4063e
  ryanofsky:
    Code review ACK 4814e4063e. Just implemented the suggested orderpos, copyfrom, and path set comments since last review
  furszy:
    ACK 4814e406

Tree-SHA512: 0b992430df9f452cb252c2212df8e876613f43564fcd1dc00c6c31fa497adb84dfff6b5ef597590f9b288c5f64cb455f108fcc9b6c9d1fe9eb2c39e7f2c12a89
2023-10-23 17:35:36 -04:00
..
rpc tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
test tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
bdb.cpp wallet: bdb: include bdb header from our implementation files only 2023-07-07 14:14:20 +00:00
bdb.h wallet: bdb: include bdb header from our implementation files only 2023-07-07 14:14:20 +00:00
coincontrol.cpp refactor: Make ListSelected return vector 2023-04-26 10:41:10 +02:00
coincontrol.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
coinselection.cpp Amend bumpfee for inputs with overlapping ancestry 2023-09-13 15:46:59 -04:00
coinselection.h Amend bumpfee for inputs with overlapping ancestry 2023-09-13 15:46:59 -04:00
context.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
context.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.cpp refactor: Remove unused C-style casts 2023-07-24 15:32:00 +02:00
crypter.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
db.cpp [refactor] Define MessageStartChars as std::array 2023-09-12 22:49:49 +02:00
db.h wallet: Add GetPrefixCursor to DatabaseBatch 2023-06-01 13:09:08 -04:00
dump.cpp Use only Span{} constructor for byte-like types where possible 2023-06-27 10:13:37 +02:00
dump.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
external_signer_scriptpubkeyman.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
external_signer_scriptpubkeyman.h wallet: set keypool_size instead of access global args manager 2023-02-15 15:49:44 -03:00
feebumper.cpp rpc: bumpfee, improve doc for 'reduce_output' arg 2023-09-26 20:17:02 -03:00
feebumper.h rpc: bumpfee, improve doc for 'reduce_output' arg 2023-09-26 20:17:02 -03:00
fees.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
fees.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
interfaces.cpp Merge bitcoin-core/gui#119: Replace send-to-self with dual send+receive entries 2023-09-22 18:29:51 +01:00
load.cpp scripted-diff: move settings to common namespace 2023-05-30 17:26:51 +02:00
load.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
receive.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
receive.h wallet: Add wallet/types.h for simple public enum and struct types 2023-04-11 15:52:25 -04:00
salvage.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
salvage.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
scriptpubkeyman.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
scriptpubkeyman.h Merge bitcoin/bitcoin#28508: refactor: Remove SER_GETHASH, hard-code client version in CKeyPool serialize 2023-10-02 12:33:54 +02:00
spend.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
spend.h Amend bumpfee for inputs with overlapping ancestry 2023-09-13 15:46:59 -04:00
sqlite.cpp [refactor] Define MessageStartChars as std::array 2023-09-12 22:49:49 +02:00
sqlite.h wallet: sqlite: force sqlite3.h to be included by the cpp files 2023-07-06 19:53:44 +00:00
transaction.cpp wallet: Copy all tx metadata to watchonly wallet 2023-10-19 18:06:43 -04:00
transaction.h Merge bitcoin/bitcoin#28609: wallet: Reload watchonly and solvables wallets after migration 2023-10-23 17:35:36 -04:00
types.h wallet: add AddressPurpose enum to replace string values 2023-04-11 15:52:25 -04:00
wallet.cpp Merge bitcoin/bitcoin#28609: wallet: Reload watchonly and solvables wallets after migration 2023-10-23 17:35:36 -04:00
wallet.h validation: pass ChainstateRole for validationinterface calls 2023-09-30 06:38:47 -04:00
walletdb.cpp Move CScriptID to script.{h/cpp} 2023-08-14 17:38:27 -04:00
walletdb.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
wallettool.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
wallettool.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
walletutil.h Merge bitcoin/bitcoin#25634: wallet, tests: Expand and test when the blank wallet flag should be un/set 2023-06-14 09:30:39 -04:00