From 0f6c7b98a5064671042bace38e3fc404f4bf15e5 Mon Sep 17 00:00:00 2001 From: MeshCollider Date: Sat, 27 Jul 2019 22:28:24 +1200 Subject: [PATCH] Merge #16402: Remove wallet settings from chainparams fa4a605a4c611abe9af4c18aab20f4d1d039170f Remove wallet settings from chainparams (MarcoFalke) Pull request description: Feels a bit odd to have wallet setting in the chainparams, so remove them from there ACKs for top commit: promag: ACK fa4a605a4c611abe9af4c18aab20f4d1d039170f, missed s/2018/2019? practicalswift: utACK fa4a605a4c611abe9af4c18aab20f4d1d039170f darosior: ACK fa4a605a4c611abe9af4c18aab20f4d1d039170f Tree-SHA512: 2b3a5ee85d36af290d7db80bed1339e3c684607f1ce61cc65c906726e9174e40325fb1f67a34d8780f2a61fa39a1785e7c3a1cef5b6d6c364f38db5300cdbe3a --- src/chainparams.cpp | 9 --------- src/chainparams.h | 5 +---- src/chainparamsbase.h | 1 - src/wallet/wallet.cpp | 3 +-- src/wallet/wallet.h | 1 - 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index f91cd17b9b..b6319015f6 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -360,9 +360,6 @@ public: // (the tx=... number in the ChainStateFlushed debug.log lines) 0.3 // * estimated number of transactions per second after that timestamp }; - - /* disable fallback fee on mainnet */ - m_fallback_fee_enabled = false; } }; @@ -556,9 +553,6 @@ public: // (the tx=... number in the ChainStateFlushed debug.log lines) 0.01 // * estimated number of transactions per second after that timestamp }; - - /* enable fallback fee on testnet */ - m_fallback_fee_enabled = true; } }; @@ -1025,9 +1019,6 @@ public: params->minSize = threshold; params->threshold = threshold; params->dkgBadVotesThreshold = threshold; - - /* enable fallback fee on regtest */ - m_fallback_fee_enabled = true; } void UpdateLLMQTestParametersFromArgs(const ArgsManager& args); }; diff --git a/src/chainparams.h b/src/chainparams.h index 09808800e6..a50f9cd775 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -70,7 +70,7 @@ public: bool RequireStandard() const { return fRequireStandard; } /** Require addresses specified with "-externalip" parameter to be routable */ bool RequireRoutableExternalIP() const { return fRequireRoutableExternalIP; } - /** If this is a test chain */ + /** If this chain is exclusively used for testing */ bool IsTestChain() const { return m_is_test_chain; } uint64_t PruneAfterHeight() const { return nPruneAfterHeight; } /** Minimum free space (in GB) needed for data directory */ @@ -87,8 +87,6 @@ public: int LLMQConnectionRetryTimeout() const { return nLLMQConnectionRetryTimeout; } /** Return the BIP70 network string (main, test or regtest) */ std::string NetworkIDString() const { return strNetworkID; } - /** Return true if the fallback fee is by default enabled for this network */ - bool IsFallbackFeeEnabled() const { return m_fallback_fee_enabled; } /** Return the list of hostnames to look up for DNS seeds */ const std::vector& DNSSeeds() const { return vSeeds; } const std::vector& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } @@ -138,7 +136,6 @@ protected: int nLLMQConnectionRetryTimeout; CCheckpointData checkpointData; ChainTxData chainTxData; - bool m_fallback_fee_enabled; int nPoolMinParticipants; int nPoolMaxParticipants; int nFulfilledRequestExpireTime; diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h index ce48376e06..47133e7e27 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -7,7 +7,6 @@ #include #include -#include /** * CBaseChainParams defines the base parameters (shared between dash-cli and dashd) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 87ec080803..16e66619f7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -5103,8 +5103,7 @@ std::shared_ptr CWallet::CreateWalletFromFile(interfaces::Chain& chain, walletInstance->m_min_fee = CFeeRate(n); } - // TODO: enable when IsFallbackFeeEnabled is backported - // walletInstance->m_allow_fallback_fee = Params().IsFallbackFeeEnabled(); + walletInstance->m_allow_fallback_fee = Params().IsTestChain(); if (gArgs.IsArgSet("-fallbackfee")) { CAmount nFeePerK = 0; if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 5723b398e3..afcfab9d1f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -12,7 +12,6 @@ #include #include #include -#include #include