diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-12-13 01:37:40 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-05-16 17:37:10 +0200 |
commit | c9fdaa5e3ae09b45be6a5c2d4ee6b1e8cef9d8a8 (patch) | |
tree | b62e51a4d4f0ce0135c02643948817d7c7dd7846 /src/wallet/spend.h | |
parent | 6b87fa540c407d167535561ac25e3225bf76d6cc (diff) | |
download | bitcoin-c9fdaa5e3ae09b45be6a5c2d4ee6b1e8cef9d8a8.tar.xz |
wallet: CreateTransactionInternal(): return out-params as (optional) struct
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r-- | src/wallet/spend.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index e43aac5273..ca5714245e 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -82,6 +82,16 @@ std::optional<SelectionResult> AttemptSelection(const CWallet& wallet, const CAm std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vector<COutput>& vAvailableCoins, const CAmount& nTargetValue, const CCoinControl& coin_control, const CoinSelectionParams& coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet); +struct CreatedTransactionResult +{ + CTransactionRef tx; + CAmount fee; + int change_pos; + + CreatedTransactionResult(CTransactionRef tx, CAmount fee, int change_pos) + : tx(tx), fee(fee), change_pos(change_pos) {} +}; + /** * Create a new transaction paying the recipients with a set of coins * selected by SelectCoins(); Also create the change output, when needed |