0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-13 11:25:02 -05:00
bitcoin-bitcoin-core/src/wallet
Andrew Chow 7edce77ff3
Merge bitcoin/bitcoin#28067: descriptors: do not return top-level only funcs as sub descriptors
dd9633b516 test: wallet, add coverage for watch-only raw sh script migration (furszy)
cc781a2180 descriptor: InferScript, do not return top-level only func as sub descriptor (furszy)
286e0c7d5e wallet: loading, log descriptor parsing error details (furszy)

Pull request description:

  Linked to #28057.

  Currently, the `InferScript` function returns an invalid descriptor when it tries to infer a p2sh-p2pkh script whose pubkey is not known by the wallet.

  This behavior occurs because the inference process bypasses the `pkh` subscript when the pubkey is not contained by the wallet (no pubkey provider), interpreting it as a `sh(addr(ADDR))` descriptor. Then, the failure arises because the `addr()` function is restricted to being used only at the top level.

  For reviewers, would recommend to start by examining the functional test to understand the context and the circumstances on which this can result in a fatal error (e.g. during the migration process).

ACKs for top commit:
  achow101:
    ACK dd9633b516
  darosior:
    utACK dd9633b516

Tree-SHA512: 61e763206c604c372019d2c36e31684f3dddf81f8b154eb9aba5cd66d8d61bda457ed4e591613eb6ce6c76cf7c3f11764abc6cd727a7c2b6414f1065783be032
2023-07-20 11:16:45 -04:00
..
rpc Merge bitcoin/bitcoin#26467: bumpfee: Allow the user to choose which output is change 2023-07-20 09:55:04 +01:00
test Merge bitcoin/bitcoin#27425: test: move remaining rand code from util/setup_common to util/random 2023-07-19 10:26:11 +01: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 refactor: Make ListSelected return vector 2023-04-26 10:41:10 +02:00
coinselection.cpp [bug] Increase SRD target by change_fee 2023-06-21 16:19:19 -04:00
coinselection.h [bug] Increase SRD target by change_fee 2023-06-21 16:19:19 -04:00
context.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
context.h
crypter.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
crypter.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
db.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +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 bumpfee: Allow original change position to be specified 2023-06-26 17:49:09 -04:00
feebumper.h bumpfee: Allow original change position to be specified 2023-06-26 17:49:09 -04:00
fees.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
fees.h
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/bitcoin#27224: refactor: Remove CAddressBookData::destdata 2023-05-01 08:16:54 -04: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 wallet: bdb: include bdb header from our implementation files only 2023-07-07 14:14:20 +00:00
salvage.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
scriptpubkeyman.cpp refactor: extract descriptor ID calculation from spkm GetID() 2023-06-28 09:37:15 -03:00
scriptpubkeyman.h Merge bitcoin/bitcoin#27759: Fix #includes in src/wallet 2023-05-29 16:33:14 +01:00
spend.cpp [bug] Increase SRD target by change_fee 2023-06-21 16:19:19 -04:00
spend.h gui: bugfix, getAvailableBalance skips selected coins 2023-04-03 17:23:42 -03:00
sqlite.cpp refactor: Drop unsafe AsBytePtr function 2023-06-28 15:14:45 -04: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
transaction.h wallet: Add wallet/types.h for simple public enum and struct types 2023-04-11 15:52:25 -04:00
types.h wallet: add AddressPurpose enum to replace string values 2023-04-11 15:52:25 -04:00
wallet.cpp wallet: migration bugfix, persist empty labels 2023-07-06 16:11:55 -03:00
wallet.h Add [[nodiscard]] where ignoring a Result return type is an error 2023-05-29 13:12:45 +02:00
walletdb.cpp wallet: loading, log descriptor parsing error details 2023-07-11 11:34:25 -03:00
walletdb.h walletdb: Refactor legacy wallet record loading into its own function 2023-06-27 11:00:47 -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
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