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/spend.h | |
parent | a7484be65f7617d77aff92ecf6f5fb26015d27a8 (diff) | |
download | bitcoin-37c75c58202f89b752500f76c872d7f8caf6bdb3.tar.xz |
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/spend.h')
-rw-r--r-- | src/wallet/spend.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index 504c078b80..3bd37cfd0e 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -216,7 +216,7 @@ struct CreatedTransactionResult /** * Create a new transaction paying the recipients with a set of coins * selected by SelectCoins(); Also create the change output, when needed - * @note passing change_pos as -1 will result in setting a random position + * @note passing change_pos as std::nullopt will result in setting a random position */ util::Result<CreatedTransactionResult> CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, std::optional<unsigned int> change_pos, const CCoinControl& coin_control, bool sign = true); |