mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 16:53:52 +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:
@@ -558,7 +558,7 @@ public:
|
||||
CTransactionRef tx;
|
||||
CCoinControl dummy;
|
||||
{
|
||||
auto res = CreateTransaction(*wallet, {recipient}, std::nullopt, dummy);
|
||||
auto res = CreateTransaction(*wallet, {recipient}, /*change_pos=*/std::nullopt, dummy);
|
||||
BOOST_CHECK(res);
|
||||
tx = res->tx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user