diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-12-12 15:03:23 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-12-12 15:20:38 -0300 |
commit | 37c75c58202f89b752500f76c872d7f8caf6bdb3 (patch) | |
tree | 8992cd7b761c63a5654dd5219a4e05f5e717bb96 /src/wallet/rpc/spend.cpp | |
parent | a7484be65f7617d77aff92ecf6f5fb26015d27a8 (diff) |
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()'
Diffstat (limited to 'src/wallet/rpc/spend.cpp')
-rw-r--r-- | src/wallet/rpc/spend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index b121c8e1a7..5a13b5ac8e 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -155,7 +155,7 @@ UniValue SendMoney(CWallet& wallet, const CCoinControl &coin_control, std::vecto std::shuffle(recipients.begin(), recipients.end(), FastRandomContext()); // Send - auto res = CreateTransaction(wallet, recipients, std::nullopt, coin_control, true); + auto res = CreateTransaction(wallet, recipients, /*change_pos=*/std::nullopt, coin_control, true); if (!res) { throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, util::ErrorString(res).original); } |