bitcoin/src/wallet
Russell Yanofsky 005f8a92cc wallet: Improve LegacyScriptPubKeyMan::CanProvide script recognition
Make LegacyScriptPubKeyMan::CanProvide method able to recognize p2sh scripts
when the redeem script is present in the mapScripts map without the p2sh script
also having to be added to the mapScripts map. This restores behavior prior to
https://github.com/bitcoin/bitcoin/pull/17261, which I think broke backwards
compatibility with old wallet files by no longer treating addresses created by
`addmultisigaddress` calls before #17261 as solvable.

The reason why tests didn't fail with the CanProvide implementation in #17261
is because of a workaround added in 4a7e43e846
"Store p2sh scripts in AddAndGetDestinationForScript", which masked the problem
for new `addmultisigaddress` RPC calls without fixing it for multisig addresses
already created in old wallet files.

This change adds a lot of comments and allows reverting commit
4a7e43e846 "Store p2sh scripts in
AddAndGetDestinationForScript", so the AddAndGetDestinationForScript() function,
CanProvide() method, and mapScripts map should all be more comprehensible
2020-02-12 11:48:30 -05:00
..
test wallet: Improve LegacyScriptPubKeyMan::CanProvide script recognition 2020-02-12 11:48:30 -05: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 scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13: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 scripted-diff: Bump copyright of files changed in 2020 2020-01-15 02:18:00 +07:00
db.h Merge #17070: wallet: Avoid showing GUI popups on RPC errors 2019-10-21 13:48:27 +02:00
feebumper.cpp Change bumpfee to use watch-only funds for legacy watchonly wallets 2019-12-18 09:03:36 -05:00
feebumper.h change wallet pointers to references in feebumper 2019-10-10 17:46:59 -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 Document better -keypool as a look-ahead safety mechanism 2019-12-18 13:31:32 -05:00
ismine.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
load.cpp wallet: Avoid showing GUI popups on RPC errors 2019-10-08 13:02:14 -04:00
load.h wallet: Fix documentation around WalletParameterInteraction 2019-09-03 14:10:25 -04:00
psbtwallet.cpp Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2020-01-30 17:21:21 +13:00
psbtwallet.h Fix doxygen errors 2020-01-16 18:25:11 -08:00
rpcdump.cpp Merge #17804: doc: Misc RPC help fixes 2020-02-05 14:54:42 +01:00
rpcwallet.cpp Merge #18032: rpc: Output a descriptor in createmultisig and addmultisigaddress 2020-02-09 04:55:45 -08:00
rpcwallet.h Refactor: Allow LegacyScriptPubKeyMan to be null 2020-01-23 16:34:28 -05:00
scriptpubkeyman.cpp wallet: Improve LegacyScriptPubKeyMan::CanProvide script recognition 2020-02-12 11:48:30 -05:00
scriptpubkeyman.h Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2020-01-30 17:21:21 +13:00
wallet.cpp Remove false positive GCC warning 2020-02-01 23:07:19 +02:00
wallet.h Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2020-01-30 17:21:21 +13:00
walletdb.cpp Refactor: Allow LegacyScriptPubKeyMan to be null 2020-01-23 16:34:28 -05:00
walletdb.h Fix doxygen errors 2020-01-16 18:25:11 -08:00
wallettool.cpp Refactor: Allow LegacyScriptPubKeyMan to be null 2020-01-23 16:34:28 -05:00
wallettool.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
walletutil.cpp Merge #15870: wallet: Only fail rescan when blocks have actually been pruned 2019-05-16 11:18:27 -04:00
walletutil.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00