elements/src/wallet
Andrew Chow 74d66359da
Merge bitcoin/bitcoin#27585: fuzz: improve coinselection
bf26f978ff fuzz: coinselection, fix `m_cost_of_change` (brunoerg)
6d9b26d56a fuzz: coinselection, BnB should never produce change (brunoerg)
b2eb558407 fuzz: coinselection, compare `GetSelectedValue` with target (brunoerg)
0df0438c60 fuzz: coinselection, improve `ComputeAndSetWaste` (brunoerg)
1e351e5db1 fuzz: coinselection, add coverage for `Merge` (brunoerg)
f0244a8614 fuzz: coinselection, add coverage for `GetShuffledInputVector`/`GetInputSet` (brunoerg)
808618b8a2 fuzz: coinselection, add coverage for `AddInputs` (brunoerg)
90c4e6a241 fuzz: coinselection, add coverage for `EligibleForSpending` (brunoerg)
2a031cb2c2 fuzz: coinselection, add `CreateCoins` (brunoerg)

Pull request description:

  This PR:

  - Moves coin creation to its own function called `CreateCoins`.
  - Add coverage for `EligibleForSpending`
  - Add coverage for `AddInputs`: get result of each algorithm (srd, knapsack and bnb), call `CreateCoins` and add into them.
  - Add coverage for `GetShuffledInputVector` and `GetInputSet` using the result of each algorithm (srd, knapsack and bnb).
  - Add coverage for `Merge`: Call SRD with the new utxos and, if successful, try to merge with the previous SRD result.

ACKs for top commit:
  murchandamus:
    reACK with some minimal fuzzing bf26f978ff
  achow101:
    ACK bf26f978ff
  furszy:
    re-ACK bf26f97

Tree-SHA512: bdd2b0a39de37be0a9b21a7c51260b6b8abe538cc0ea74312eb658b90a121a1ae07306c09fb0e75e93b531ce9ea2402feb041b0d852902d07739257f792e64ab
2023-08-24 16:11:20 -04:00
..
rpc rpc: Add MaybeArg() and Arg() default helper 2023-08-24 10:44:45 +02:00
test Merge bitcoin/bitcoin#27585: fuzz: improve coinselection 2023-08-24 16:11:20 -04: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 Clean up things that include script/standard.h 2023-08-14 17:38:27 -04: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 Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.cpp refactor: Remove unused C-style casts 2023-07-24 15:32:00 +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 Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
interfaces.cpp Clean up things that include script/standard.h 2023-08-14 17:38:27 -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 Rename script/standard.{cpp/h} to script/solver.{cpp/h} 2023-08-14 17:39:49 -04:00
scriptpubkeyman.h Merge bitcoin/bitcoin#28237: refactor: Enforce C-str fmt strings in WalletLogPrintf() 2023-08-18 11:38:38 +01:00
spend.cpp Rename script/standard.{cpp/h} to script/solver.{cpp/h} 2023-08-14 17:39:49 -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 Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
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 Merge bitcoin/bitcoin#28200: refactor: Remove unused includes from wallet.cpp 2023-08-22 10:34:10 +01:00
wallet.h Merge bitcoin/bitcoin#28200: refactor: Remove unused includes from wallet.cpp 2023-08-22 10:34:10 +01:00
walletdb.cpp Move CScriptID to script.{h/cpp} 2023-08-14 17:38:27 -04:00
walletdb.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -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 Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
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