0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-10 15:46:48 -04:00
bitcoin-core/src/wallet
Andrew Chow c85688347e
Merge bitcoin/bitcoin#26021: wallet: bugfix, load a wallet with an unknown/corrupt descriptor causes a fatal error
e06676377d wallet: coverage for loading an unknown descriptor (furszy)
d26c3cc444 wallet: bugfix, load wallet with an unknown descriptor cause fatal error (furszy)

Pull request description:

  Fixes #26015

  If the descriptor entry is unrecognized (due a soft downgrade) or corrupt, the
  unserialization fails and `LoadWallet`, instead of stop there and return the error,
  continues reading all the db records. As other records tied to the unrecognized
  or corrupt descriptor are scanned, a fatal error is being thrown.

  This fixes it by catching the descriptor parse failure and return which wallet failed.
  Logging its name/path, so the user can remove it from the settings file, to prevent
  its load at startup.

  Note: added the test in a separate file intentionally.
  Will continue adding coverage for the wallet load process in follow-up PRs.

ACKs for top commit:
  achow101:
    ACK e06676377d
  Sjors:
    re-utACK e06676377d

Tree-SHA512: d1f1a5d7e944c89c97a33b25b4411a36a11edae172c22f8524f69c84a035f84c570b284679f901fe60f1300f781b76a6c17b015a8e7ad44ebd25a0c295ef260f
2022-09-13 11:51:51 -04:00
..
rpc Merge bitcoin/bitcoin#26010: RPC: fix sendall docs 2022-09-06 18:00:57 -04:00
test wallet: coverage for loading an unknown descriptor 2022-09-09 15:35:31 -03:00
bdb.cpp refactor: Make const refs vars where applicable 2022-07-27 13:27:57 +02:00
bdb.h
coincontrol.cpp
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
context.h
crypter.cpp
crypter.h
db.cpp
db.h
dump.cpp Use HashWriter where possible 2022-07-20 15:34:36 +02:00
dump.h
external_signer_scriptpubkeyman.cpp GetExternalSigner(): fail if multiple signers are found 2022-06-09 20:34:46 +02:00
external_signer_scriptpubkeyman.h
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
init.cpp scripted-diff: Avoid incompatibility with CMake AUTOUIC feature 2022-06-14 10:38:51 +02:00
interfaces.cpp bumpfee: be able to bump fee of a tx with external inputs 2022-08-19 11:27:01 -04:00
ismine.h
load.cpp wallet: trigger MaybeResendWalletTxs() every minute 2022-08-25 14:29:25 +01:00
load.h
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
salvage.h
scriptpubkeyman.cpp Implement LegacyScriptPubKeyMan::DeleteRecords 2022-08-26 13:14:51 -04:00
scriptpubkeyman.h Implement LegacyScriptPubKeyMan::DeleteRecords 2022-08-26 13:14:51 -04:00
spend.cpp Merge bitcoin/bitcoin#25872: Fix issues when calling std::move(const&) 2022-08-31 08:38:24 +01:00
spend.h wallet: switch to new shuffle, erase, push_back 2022-08-10 15:19:31 +02:00
sqlite.cpp
sqlite.h
transaction.cpp
transaction.h wallet: Deduplicate Resend and ReacceptWalletTransactions 2022-08-29 12:38:06 -04:00
wallet.cpp wallet: bugfix, load wallet with an unknown descriptor cause fatal error 2022-09-09 15:35:04 -03:00
wallet.h Merge bitcoin/bitcoin#25768: wallet: Properly rebroadcast unconfirmed transaction chains 2022-09-05 13:54:36 +01: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
walletutil.cpp
walletutil.h Implement LegacyScriptPubKeyMan::MigrateToDescriptor 2022-08-25 16:25:53 -04:00