diff --git a/src/wallet/spend.h b/src/wallet/spend.h index 75090b308c3..925111dce03 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -186,17 +187,6 @@ util::Result SelectCoins(const CWallet& wallet, CoinsResult& av const CAmount& nTargetValue, const CCoinControl& coin_control, const CoinSelectionParams& coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet); -struct CreatedTransactionResult -{ - CTransactionRef tx; - CAmount fee; - FeeCalculation fee_calc; - std::optional change_pos; - - CreatedTransactionResult(CTransactionRef _tx, CAmount _fee, std::optional _change_pos, const FeeCalculation& _fee_calc) - : tx(_tx), fee(_fee), fee_calc(_fee_calc), change_pos(_change_pos) {} -}; - /** * Set a height-based locktime for new transactions (uses the height of the * current chain tip unless we are not synced with the current chain diff --git a/src/wallet/types.h b/src/wallet/types.h index 97c18d4f3fd..09ad4a0ab4c 100644 --- a/src/wallet/types.h +++ b/src/wallet/types.h @@ -14,7 +14,7 @@ #ifndef BITCOIN_WALLET_TYPES_H #define BITCOIN_WALLET_TYPES_H -#include +#include namespace wallet { /** @@ -30,6 +30,18 @@ enum class AddressPurpose { SEND, REFUND, //!< Never set in current code may be present in older wallet databases }; + +struct CreatedTransactionResult +{ + CTransactionRef tx; + CAmount fee; + FeeCalculation fee_calc; + std::optional change_pos; + + CreatedTransactionResult(CTransactionRef _tx, CAmount _fee, std::optional _change_pos, const FeeCalculation& _fee_calc) + : tx(_tx), fee(_fee), fee_calc(_fee_calc), change_pos(_change_pos) {} +}; + } // namespace wallet #endif // BITCOIN_WALLET_TYPES_H