mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 08:44:02 +02:00
test: wallet, fix change position out of range error
Since #25273, the behavior of 'inserting change at a random position' is instructed by passing std::nullopt instead of -1. Also, added missing documentation about the meaning of 'change_pos=std::nullopt' inside 'CWallet::CreateTransaction()'
This commit is contained in:
@@ -129,7 +129,7 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
|
||||
|
||||
bench.epochIterations(5).run([&] {
|
||||
LOCK(wallet.cs_wallet);
|
||||
const auto& tx_res = CreateTransaction(wallet, recipients, -1, coin_control);
|
||||
const auto& tx_res = CreateTransaction(wallet, recipients, /*change_pos=*/std::nullopt, coin_control);
|
||||
assert(tx_res);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user