diff options
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r-- | src/interfaces/wallet.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 3e6f0d6728..f4dfdae8ae 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -9,6 +9,8 @@ #include <consensus/validation.h> #include <interfaces/handler.h> #include <net.h> +#include <policy/feerate.h> +#include <policy/fees.h> #include <policy/policy.h> #include <primitives/transaction.h> #include <script/ismine.h> @@ -20,6 +22,7 @@ #include <uint256.h> #include <validation.h> #include <wallet/feebumper.h> +#include <wallet/fees.h> #include <wallet/wallet.h> namespace interfaces { @@ -403,6 +406,20 @@ public: } return result; } + CAmount getRequiredFee(unsigned int tx_bytes) override { return GetRequiredFee(m_wallet, tx_bytes); } + CAmount getMinimumFee(unsigned int tx_bytes, + const CCoinControl& coin_control, + int* returned_target, + FeeReason* reason) override + { + FeeCalculation fee_calc; + CAmount result; + result = GetMinimumFee(m_wallet, tx_bytes, coin_control, ::mempool, ::feeEstimator, &fee_calc); + if (returned_target) *returned_target = fee_calc.returnedTarget; + if (reason) *reason = fee_calc.reason; + return result; + } + unsigned int getConfirmTarget() override { return m_wallet.m_confirm_target; } bool hdEnabled() override { return m_wallet.IsHDEnabled(); } OutputType getDefaultAddressType() override { return m_wallet.m_default_address_type; } OutputType getDefaultChangeType() override { return m_wallet.m_default_change_type; } |