Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#29117: wallettool: Always be able to dump a wallet's da…
…tabase d83bea4 wallettool: Don't create CWallet when dumping DB (Andrew Chow) 40c80e3 wallettool: Don't unilaterally reset wallet_instance if loading error (Ava Chow) Pull request description: bitcoin#29109 (comment) reports that a wallet with noncritical errors cannot be dumped with `bitcoin-wallet dump`. This was caused by an erroneous reset of the wallet pointer when the loading the wallet returns something other than `LOAD_OK`. Not all errors are errors that require aborting, so unilaterally resetting the pointer at that time is incorrect. The first commit resolves this issue. Furthermore, if a wallet has loading errors, that should not prevent the wallet tool from dumping the wallet. The wallet application logic should not get in the way of performing such a low level database operation, especially when it's primary usage is for debugging potentially corrupted wallets. The 2nd commit is taken from bitcoin#28710 and changes the `dump` to stop at making a `WalletDatabase` rather than making a `CWallet` only to retrieve the underlying `WalletDatabase`. ACKs for top commit: furszy: Code review ACK d83bea4 BrandonOdiwuor: Code Review ACK d83bea4 Tree-SHA512: 425d712dfff1002bd81272aca0bae1016f9126a3c89506f8cb7cf0a0ec9f33d0c03b8d03896394f3a45c2998e59047e19218dfd08dc8a5f40e8625134e886b0f
- Loading branch information