diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-12-13 03:15:40 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-05-16 17:46:34 +0200 |
commit | 4c5ceb040cf50d24201903a9200fb23be88d96fb (patch) | |
tree | b3b1fc04fdd06e41166c461a2e272d52ffe3f981 /src/wallet/spend.h | |
parent | c9fdaa5e3ae09b45be6a5c2d4ee6b1e8cef9d8a8 (diff) | |
download | bitcoin-4c5ceb040cf50d24201903a9200fb23be88d96fb.tar.xz |
wallet: CreateTransaction(): return out-params as (optional) struct
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r-- | src/wallet/spend.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index ca5714245e..8af712110d 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -10,6 +10,8 @@ #include <wallet/transaction.h> #include <wallet/wallet.h> +#include <optional> + namespace wallet { /** Get the marginal bytes if spending the specified output from this transaction. * use_max_sig indicates whether to use the maximum sized, 72 byte signature when calculating the @@ -95,9 +97,9 @@ 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 nChangePosInOut as -1 will result in setting a random position + * @note passing change_pos as -1 will result in setting a random position */ -bool CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign = true); +std::optional<CreatedTransactionResult> CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, int change_pos, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign = true); /** * Insert additional inputs into the transaction by |