aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-27 09:28:51 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-27 09:28:54 -0400
commit3356799ee3f5441b8d6e68b9172eb641011354f8 (patch)
treec7d9cfc35fb92eb7f9cc60f006b01955e5ab809c /src/interfaces
parentb025aa3b9e1dd02369ee0a016b8349536290fa7f (diff)
parent5c759c73b2602c7fde1c50dbafe5525904c1b64c (diff)
Merge #15778: [wallet] Move maxtxfee from node to wallet
5c759c73b2 [wallet] Move maxTxFee to wallet (John Newbery) Pull request description: Closes #15355 Moves the `-maxtxfee` from the node to the wallet. See discussion in issue for details. This is a cleanup. There is no change in behaviour. Completes #15620 ACKs for commit 5c759c: MarcoFalke: utACK 5c759c73b2602c7fde1c50dbafe5525904c1b64c ryanofsky: utACK 5c759c73b2602c7fde1c50dbafe5525904c1b64c. Changes since last review: updated commit message and an error message and method name. meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/15778/commits/5c759c73b2602c7fde1c50dbafe5525904c1b64c Tree-SHA512: 2f9b2729da3940a5cda994d3f3bc11ee1a52fcc1c5e9842ea0ea63e4eb0300e8416853046776311298bc449ba07554aa46f0f245ce28598a5b0bd7347c12e752
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/chain.cpp1
-rw-r--r--src/interfaces/chain.h6
-rw-r--r--src/interfaces/node.cpp1
-rw-r--r--src/interfaces/node.h3
-rw-r--r--src/interfaces/wallet.cpp1
-rw-r--r--src/interfaces/wallet.h3
6 files changed, 4 insertions, 11 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index 4f2eb924a2..839af650bb 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -325,7 +325,6 @@ public:
CFeeRate relayMinFee() override { return ::minRelayTxFee; }
CFeeRate relayIncrementalFee() override { return ::incrementalRelayFee; }
CFeeRate relayDustFee() override { return ::dustRelayFee; }
- CAmount maxTxFee() override { return ::maxTxFee; }
bool getPruneMode() override { return ::fPruneMode; }
bool p2pEnabled() override { return g_connman != nullptr; }
bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !IsInitialBlockDownload(); }
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index 180991526b..7564ad26ac 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -207,12 +207,6 @@ public:
//! Relay dust fee setting (-dustrelayfee), reflecting lowest rate it's economical to spend.
virtual CFeeRate relayDustFee() = 0;
- //! Node max tx fee setting (-maxtxfee).
- //! This could be replaced by a per-wallet max fee, as proposed at
- //! https://github.com/bitcoin/bitcoin/issues/15355
- //! But for the time being, wallets call this to access the node setting.
- virtual CAmount maxTxFee() = 0;
-
//! Check if pruning is enabled.
virtual bool getPruneMode() = 0;
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 73a5074133..f3ee8fe364 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -207,7 +207,6 @@ public:
}
}
bool getNetworkActive() override { return g_connman && g_connman->GetNetworkActive(); }
- CAmount getMaxTxFee() override { return ::maxTxFee; }
CFeeRate estimateSmartFee(int num_blocks, bool conservative, int* returned_target = nullptr) override
{
FeeCalculation fee_calc;
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 76b93af234..1ccd2a31b7 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -159,9 +159,6 @@ public:
//! Get network active.
virtual bool getNetworkActive() = 0;
- //! Get max tx fee.
- virtual CAmount getMaxTxFee() = 0;
-
//! Estimate smart fee.
virtual CFeeRate estimateSmartFee(int num_blocks, bool conservative, int* returned_target = nullptr) = 0;
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index ed73a71354..b57299d78d 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -469,6 +469,7 @@ public:
bool IsWalletFlagSet(uint64_t flag) override { return m_wallet->IsWalletFlagSet(flag); }
OutputType getDefaultAddressType() override { return m_wallet->m_default_address_type; }
OutputType getDefaultChangeType() override { return m_wallet->m_default_change_type; }
+ CAmount getDefaultMaxTxFee() override { return m_wallet->m_default_max_tx_fee; }
void remove() override
{
RemoveWallet(m_wallet);
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index cabc455b1f..7096f54047 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -247,6 +247,9 @@ public:
// Get default change type.
virtual OutputType getDefaultChangeType() = 0;
+ //! Get max tx fee.
+ virtual CAmount getDefaultMaxTxFee() = 0;
+
// Remove wallet.
virtual void remove() = 0;