0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-05 10:17:30 -05:00
bitcoin-bitcoin-core/src/wallet
Samuel Dobson 7127c31020
Merge #17237: wallet: LearnRelatedScripts only if KeepDestination
3958295bc8 wallet: LearnRelatedScripts only if KeepDestination (João Barbosa)
55295fba4c wallet: Lock address type in ReserveDestination (João Barbosa)

Pull request description:

  Only mutates the wallet if the reserved key is kept.

  First commit is a refactor that makes the address type a class member.

  The second commit moves `LearnRelatedScripts` from `GetReservedDestination` to `KeepDestination` to avoid an unnecessary call to `AddCScript` - which in turn prevents multiple entries of the same script in the wallet DB.

ACKs for top commit:
  achow101:
    Re-ACK 3958295bc8
  Sjors:
    ACK 3958295bc8
  ryanofsky:
    Code review ACK 3958295bc8. I like this change. The new behavior makes more sense, and the change makes the code clearer, since the current LearnRelatedScripts call is hard to understand and explain. (Personally, I'd like it if this PR were merged before #17373 or that PR was rebased on top of this one so it would be less confusing.)
  meshcollider:
    utACK 3958295bc8

Tree-SHA512: 49a5f4b022b28042ad37ea309b28378a3983cb904e234a25795b5a360356652e0f8e60f15e3e64d85094ea63af9be01812d90ccfc08ca4f1dd927fdd8566e33f
2019-11-23 09:26:58 +13:00
..
test Merge #17290: Enable BnB coin selection for preset inputs and subtract fee from outputs 2019-11-23 08:06:35 +13:00
coincontrol.cpp extract min & max depth onto coin control 2019-07-22 15:23:21 -04:00
coincontrol.h refactor: Replace all uses of boost::optional with our own Optional type 2019-10-30 14:27:31 +01:00
coinselection.cpp refactor: Replace all uses of boost::optional with our own Optional type 2019-10-30 14:27:31 +01: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 Remove unused includes 2019-10-15 22:56:43 +00:00
db.cpp scripted-diff: Change BCLog::DB to BCLog::WALLETDB 2019-11-08 18:45:38 +01:00
db.h Merge #17070: wallet: Avoid showing GUI popups on RPC errors 2019-10-21 13:48:27 +02:00
feebumper.cpp Remove locked_chain from GetDepthInMainChain and its callers 2019-11-06 13:36:43 -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 Pass NodeContext, ConnMan, BanMan references more places 2019-10-28 10:30:51 -04:00
ismine.h Refactor: Split up CWallet and LegacyScriptPubKeyMan and classes 2019-10-25 19:20:24 -04: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 Refactor: Require scriptPubKey to get wallet SigningProvider 2019-11-18 15:42:01 -05:00
psbtwallet.h Remove unused includes 2019-10-15 22:56:43 +00:00
rpcdump.cpp Merge #15931: Remove GetDepthInMainChain dependency on locked chain interface 2019-11-08 23:23:14 +13:00
rpcwallet.cpp Merge #17371: Refactor: Require scriptPubKey to get wallet SigningProvider 2019-11-23 08:35:10 +13:00
rpcwallet.h Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cpp 2019-11-05 10:13:43 -05:00
scriptpubkeyman.cpp Clean up nested scope in GetReservedDestination 2019-11-05 10:47:07 -05:00
scriptpubkeyman.h Get rid of confusing LegacyScriptPubKeyMan::TopUpKeyPool method 2019-11-05 10:43:36 -05:00
wallet.cpp Merge #17237: wallet: LearnRelatedScripts only if KeepDestination 2019-11-23 09:26:58 +13:00
wallet.h Merge #17237: wallet: LearnRelatedScripts only if KeepDestination 2019-11-23 09:26:58 +13:00
walletdb.cpp scripted-diff: Change BCLog::DB to BCLog::WALLETDB 2019-11-08 18:45:38 +01:00
walletdb.h Merge #17070: wallet: Avoid showing GUI popups on RPC errors 2019-10-21 13:48:27 +02:00
wallettool.cpp Merge #17260: Split some CWallet functions into new LegacyScriptPubKeyMan 2019-10-29 08:19:23 -04:00
wallettool.h Remove unused includes 2019-10-15 22:56:43 +00: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 Move wallet enums to walletutil.h 2019-10-25 19:20:24 -04:00