mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
coin selection: BnB, don't return selection if exceeds max allowed tx weight
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <bench/bench.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <node/context.h>
|
||||
#include <policy/policy.h>
|
||||
#include <wallet/coinselection.h>
|
||||
#include <wallet/spend.h>
|
||||
#include <wallet/wallet.h>
|
||||
@@ -115,7 +116,7 @@ static void BnBExhaustion(benchmark::Bench& bench)
|
||||
bench.run([&] {
|
||||
// Benchmark
|
||||
CAmount target = make_hard_case(17, utxo_pool);
|
||||
SelectCoinsBnB(utxo_pool, target, 0); // Should exhaust
|
||||
SelectCoinsBnB(utxo_pool, target, 0, MAX_STANDARD_TX_WEIGHT); // Should exhaust
|
||||
|
||||
// Cleanup
|
||||
utxo_pool.clear();
|
||||
|
||||
Reference in New Issue
Block a user