aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-04-07 12:12:46 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-04-23 10:49:21 -0400
commitfac0db0ff8e72ca30a0da8a64fc1d115dd2d6f8c (patch)
treed12d25bb207858129003ef6c33956f6c8a3fcdcb /src/interfaces/wallet.cpp
parentd5b2e98250f6b2a8b70d12893fee371f27fc4400 (diff)
wallet: Make fee settings non-static members
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r--src/interfaces/wallet.cpp17
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; }