diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-05-24 12:29:51 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-07-08 11:18:35 -0300 |
commit | 198fcca162f4d2f877feab485e629ff89818ff56 (patch) | |
tree | c2d761c60589b323f811883963853326e421718d /src/wallet/spend.h | |
parent | 7a45c33d1f8a758850cf8e7bd6ad508939ba5c0d (diff) | |
download | bitcoin-198fcca162f4d2f877feab485e629ff89818ff56.tar.xz |
wallet: refactor, include 'FeeCalculation' inside 'CreatedTransactionResult'
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r-- | src/wallet/spend.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index cba42d6fae..ecf9b695ee 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -6,6 +6,7 @@ #define BITCOIN_WALLET_SPEND_H #include <consensus/amount.h> +#include <policy/fees.h> // for FeeCalculation #include <wallet/coinselection.h> #include <wallet/transaction.h> #include <wallet/wallet.h> @@ -107,10 +108,11 @@ struct CreatedTransactionResult { CTransactionRef tx; CAmount fee; + FeeCalculation fee_calc; int change_pos; - CreatedTransactionResult(CTransactionRef tx, CAmount fee, int change_pos) - : tx(tx), fee(fee), change_pos(change_pos) {} + CreatedTransactionResult(CTransactionRef _tx, CAmount _fee, int _change_pos, const FeeCalculation& _fee_calc) + : tx(_tx), fee(_fee), fee_calc(_fee_calc), change_pos(_change_pos) {} }; /** @@ -118,7 +120,7 @@ struct CreatedTransactionResult * selected by SelectCoins(); Also create the change output, when needed * @note passing change_pos as -1 will result in setting a random position */ -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); +std::optional<CreatedTransactionResult> CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, int change_pos, bilingual_str& error, const CCoinControl& coin_control, bool sign = true); /** * Insert additional inputs into the transaction by |