dash/src/wallet
fanquake 6146d2991d Merge #17568: wallet: fix when sufficient preset inputs and subtractFeeFromOutputs
eadd1304c81e0b89178e4cc7630bd31650850c85 tests: Add a test for funding with sufficient preset inputs and subtractFeeFromOutputs (Andrew Chow)
ff330badd45067cb520b1cfa1844f60a4c9f2031 Default to bnb_used = false as there are many cases where BnB is not used (Andrew Chow)

Pull request description:

  #17290 introduced a bug where, when we had preset inputs that covered the amount being sent and subtractFeeFrromOutputs was being used, transaction funding would result in a `Fee exceeds maximum configured by -maxtxfee` error. This was happening because we weren't setting `bnb_used = false` when the preset inputs were used as it should have been. This resulted in a too high fee because the change would go to fees accidentally.

  Apparently this particular case doesn't have a test, so I've added one as well.

ACKs for top commit:
  Sjors:
    ACK eadd130. I can't get this new test to fail on macOS (without this PR). It passes whether or not I compile with `--enable-debug`. It does fail on Ubuntu. Yay undefined behavior... Anyway, it's a useful test.
  fanquake:
    ACK eadd1304c81e0b89178e4cc7630bd31650850c85
  instagibbs:
    utACK eadd1304c8

Tree-SHA512: 7286c321f78666eea558cc591174630d210263594df41cab1065417510591ee514ade0e1d0cec8af09a785757da68de82592b013e8fe8d4966cec3254368706e
2023-04-17 19:34:02 +03:00
..
test Merge #17290: Enable BnB coin selection for preset inputs and subtract fee from outputs 2023-04-17 19:34:02 +03:00
bdb.cpp Merge #20952: wallet: Add BerkeleyDB version sanity check at init time 2023-04-09 00:06:56 -05:00
bdb.h Merge #20952: wallet: Add BerkeleyDB version sanity check at init time 2023-04-09 00:06:56 -05:00
coincontrol.cpp Merge #15906: [wallet] Move min_depth and max_depth to coin control 2023-04-04 12:45:27 -05:00
coincontrol.h Merge #15906: [wallet] Move min_depth and max_depth to coin control 2023-04-04 12:45:27 -05:00
coinselection.cpp merge bitcoin#21415: remove Optional & nullopt 2022-10-20 16:08:45 -05:00
coinselection.h
context.cpp merge bitcoin#19096: Remove g_rpc_chain global 2022-05-18 20:50:50 +05:30
context.h merge bitcoin#18923: Never schedule MaybeCompactWalletDB when -flushwallet is off 2022-07-03 00:14:47 +05:30
crypter.cpp Bitcoin backport #16227 refactoring CWallet (#4903) 2022-07-12 22:46:31 -05:00
crypter.h Bitcoin backport #16227 refactoring CWallet (#4903) 2022-07-12 22:46:31 -05:00
db.cpp Merge bitcoin/bitcoin#21944: wallet: Fix issues when walletdir is root directory 2023-04-16 23:40:59 +03:00
db.h merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00
fees.cpp
fees.h
init.cpp Merge #16524: Wallet: Disable -fallbackfee by default 2023-04-17 10:42:25 -05:00
interfaces.cpp merge bitcoin#20494: Move node and wallet code out of src/interfaces 2023-04-15 12:12:30 -05:00
ismine.h Merge #17260: Split some CWallet functions into new LegacyScriptPubKeyMan (#4938) 2022-08-08 11:05:21 -05:00
load.cpp Merge #21516: remove unnecessary newline from initWarning() argument 2023-04-14 23:34:13 -05:00
load.h revert: revert bitcoin#15454 (Remove the automatic creation and loading of the default wallet) 2022-12-04 18:02:40 -06:00
rpcdump.cpp merge bitcoin#17954: Remove calls to Chain::Lock methods 2023-04-15 12:12:30 -05:00
rpcwallet.cpp Merge #17283: rpc: improve getaddressinfo test coverage, help, code docs 2023-04-17 19:34:02 +03:00
rpcwallet.h Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2023-03-19 11:08:31 -05:00
salvage.cpp Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2023-03-19 11:08:31 -05:00
salvage.h merge bitcoin#19457: Cleanup wallettool salvage and walletdb extraneous declarations 2022-05-13 18:04:32 +05:30
scriptpubkeyman.cpp partial bitcoin#17938: Disallow automatic conversion between disparate hash types 2023-04-15 12:12:30 -05:00
scriptpubkeyman.h Merge #18115: wallet: Pass in transactions and messages for signing instead of exporting the private keys 2023-03-19 11:08:31 -05:00
sqlite.cpp fix: 5072 follow-ups (#5197) 2023-02-12 20:12:53 -06:00
sqlite.h merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00
wallet.cpp Merge #17568: wallet: fix when sufficient preset inputs and subtractFeeFromOutputs 2023-04-17 19:34:02 +03:00
wallet.h Merge #17290: Enable BnB coin selection for preset inputs and subtract fee from outputs 2023-04-17 19:34:02 +03:00
walletdb.cpp Merge #16911: wallet: Only check the hash of transactions loaded from disk 2023-04-17 10:42:25 -05:00
walletdb.h Merge #15709: wallet: Do not add "setting" key as unknown 2023-03-29 21:01:56 +03:00
wallettool.cpp Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2023-03-19 11:08:31 -05:00
wallettool.h merge bitcoin#19619: Remove wallet.dat path handling from wallet.cpp, rpcwallet.cpp 2022-10-17 08:03:10 +05:30
walletutil.cpp merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00
walletutil.h merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00