aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/spend.h
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-01-03 12:46:55 -0500
committerAndrew Chow <github@achow101.com>2023-01-03 12:52:40 -0500
commit65d7c31b3f5f08777d0449177bf07e16d7df1424 (patch)
treeec3bf7bacf770fbf1a3ece4d512938f49b343e0b /src/wallet/spend.h
parent7bb07bf8bd8e240562714f9cc4b7696868cb6c26 (diff)
parent9622fe64b8785430c71d4abc8637075026dc690c (diff)
downloadbitcoin-65d7c31b3f5f08777d0449177bf07e16d7df1424.tar.xz
Merge bitcoin/bitcoin#25789: test: clean and extend availablecoins_tests coverage
9622fe64b8785430c71d4abc8637075026dc690c test: move coins result test to wallet_tests.cpp (furszy) f69347d0588647ff9a4e986c7be987827a0417f4 test: extend and simplify availablecoins_tests (furszy) 212ccdf2c2b70d973b18ae78f0158ec5f0c3bbb4 wallet: AvailableCoins, add arg to include/skip locked coins (furszy) Pull request description: Negative PR with extended test coverage :). 1) Cleaned duplicated code and added coverage for the 'AvailableCoins' incremental result. 2) The class `AvailableCoinsTestingSetup` inside `availablecoins_tests.cpp` is a plain copy of `ListCoinsTestingSetup` that is inside `wallet_tests.cpp`. So, deleted the file and moved the `BasicOutputTypesTest` test case to `wallet_tests.cpp`. 3) Added arg to include/skip locked coins from the `AvailableCoins` result. This is needed for point (1) as otherwise the wallet will spend the coins that we recently created due its closeness to the recipient amount. Note: this last point comes from #25659 where I'm using the same functionality to clean/speedup another flow as well. ACKs for top commit: achow101: ACK 9622fe64b8785430c71d4abc8637075026dc690c theStack: ACK 9622fe64b8785430c71d4abc8637075026dc690c aureleoules: reACK 9622fe64b8785430c71d4abc8637075026dc690c, nice cleanup! Tree-SHA512: 1ed9133120bfe8815455d1ad317bb0ff96e11a0cc34ee8098716ab9b001749168fa649212b2fa14b330c1686cb1f29039ff1f88ae306db68881b0428c038f388
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r--src/wallet/spend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h
index c612ed105e..281a6ca9e8 100644
--- a/src/wallet/spend.h
+++ b/src/wallet/spend.h
@@ -76,6 +76,8 @@ struct CoinFilterParams {
bool only_spendable{true};
// By default, do not include immature coinbase outputs
bool include_immature_coinbase{false};
+ // By default, skip locked UTXOs
+ bool skip_locked{true};
};
/**