bitcoin/src/wallet
Samuel Dobson bbb1ba1814
Merge #17219: wallet: allow transaction without change if keypool is empty
92bcd70808 [wallet] allow transaction without change if keypool is empty (Sjors Provoost)
709f8685ac [wallet] CreateTransaction: simplify change address check (Sjors Provoost)
5efc25f963 [wallet] translate "Keypool ran out" message (Sjors Provoost)

Pull request description:

  Extracted from #16944

  First this PR simplifies the check when generating a change address, by dropping `CanGetAddresses` and just letting `reservedest.GetReservedDestination` do this check.

  Second, when the keypool is empty, instead of immediately giving up, we create a dummy change address and pass that to coin selection. If we didn't need the change address (e.g. when spending the entire balance), then it's all good. If we did need a change address, we throw the original error.

ACKs for top commit:
  fjahr:
    Code review ACK 92bcd70808
  jonasschnelli:
    utACK 92bcd70808
  achow101:
    ACK 92bcd70808
  meshcollider:
    Code review ACK 92bcd70808

Tree-SHA512: 07b8c8251f57061c58a85ebf0359be63583c23bac7a2c4cefdc14820c0cdebcc90a2bb218e5ede0db11d1e204cda149e056dfd18614642070b3d56efe2735006
2020-04-18 22:00:26 +12:00
..
test Merge #18673: scripted-diff: Sort test includes 2020-04-17 10:12:13 -04: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 bnb: exit selection when best_waste is 0 2020-03-04 16:35:15 -05: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 Merge #18241: wallet/refactor: refer to CWallet immutably when possible 2020-03-07 07:24:54 +08:00
db.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
feebumper.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
feebumper.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -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 scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
ismine.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
load.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
load.h wallet: Fix documentation around WalletParameterInteraction 2019-09-03 14:10:25 -04:00
rpcdump.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
rpcwallet.cpp Merge #18607: rpc: Fix named arguments in documentation 2020-04-17 12:16:42 -04:00
rpcwallet.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
scriptpubkeyman.cpp Merge #17219: wallet: allow transaction without change if keypool is empty 2020-04-18 22:00:26 +12:00
scriptpubkeyman.h Replace GetSigningProvider with GetSolvingProvider 2020-03-09 11:16:20 -04:00
wallet.cpp Merge #17219: wallet: allow transaction without change if keypool is empty 2020-04-18 22:00:26 +12:00
wallet.h wallet: Prefer full destination groups in coin selection 2020-04-14 15:02:06 +02:00
walletdb.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
walletdb.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
wallettool.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04: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