From fadc14e4f514e7167723285e0ac3d4a7149bbee6 Mon Sep 17 00:00:00 2001 From: MacroFake Date: Thu, 21 Jul 2022 13:47:36 +0200 Subject: Remove ::dustRelayFee --- src/node/interfaces.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/node') diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 597b473d4f..2c845d0127 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -301,7 +301,11 @@ public: } } bool getNetworkActive() override { return m_context->connman && m_context->connman->GetNetworkActive(); } - CFeeRate getDustRelayFee() override { return ::dustRelayFee; } + CFeeRate getDustRelayFee() override + { + if (!m_context->mempool) return CFeeRate{DUST_RELAY_TX_FEE}; + return m_context->mempool->m_dust_relay_feerate; + } UniValue executeRpc(const std::string& command, const UniValue& params, const std::string& uri) override { JSONRPCRequest req; @@ -686,7 +690,11 @@ public: if (!m_node.mempool) return CFeeRate{DEFAULT_INCREMENTAL_RELAY_FEE}; return m_node.mempool->m_incremental_relay_feerate; } - CFeeRate relayDustFee() override { return ::dustRelayFee; } + CFeeRate relayDustFee() override + { + if (!m_node.mempool) return CFeeRate{DUST_RELAY_TX_FEE}; + return m_node.mempool->m_dust_relay_feerate; + } bool havePruned() override { LOCK(::cs_main); -- cgit v1.2.3