Skip to content

Commit dfb7fd6

Browse files
committed
Merge #16402: Remove wallet settings from chainparams
fa4a605 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 fa4a605, missed s/2018/2019? practicalswift: utACK fa4a605 darosior: ACK fa4a605 Tree-SHA512: 2b3a5ee85d36af290d7db80bed1339e3c684607f1ce61cc65c906726e9174e40325fb1f67a34d8780f2a61fa39a1785e7c3a1cef5b6d6c364f38db5300cdbe3a
2 parents c606e6f + fa4a605 commit dfb7fd6

File tree

5 files changed

+2
-16
lines changed

5 files changed

+2
-16
lines changed

src/chainparams.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ class CMainParams : public CChainParams {
167167
/* nTxCount */ 383732546,
168168
/* dTxRate */ 3.685496590998308
169169
};
170-
171-
/* disable fallback fee on mainnet */
172-
m_fallback_fee_enabled = false;
173170
}
174171
};
175172

@@ -262,9 +259,6 @@ class CTestNetParams : public CChainParams {
262259
/* nTxCount */ 19438708,
263260
/* dTxRate */ 0.626
264261
};
265-
266-
/* enable fallback fee on testnet */
267-
m_fallback_fee_enabled = true;
268262
}
269263
};
270264

@@ -346,9 +340,6 @@ class CRegTestParams : public CChainParams {
346340
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
347341

348342
bech32_hrp = "bcrt";
349-
350-
/* enable fallback fee on regtest */
351-
m_fallback_fee_enabled = true;
352343
}
353344

354345
/**

src/chainparams.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CChainParams
6666
bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
6767
/** Policy: Filter transactions that do not match well-defined patterns */
6868
bool RequireStandard() const { return fRequireStandard; }
69-
/** If this is a test chain */
69+
/** If this chain is exclusively used for testing */
7070
bool IsTestChain() const { return m_is_test_chain; }
7171
uint64_t PruneAfterHeight() const { return nPruneAfterHeight; }
7272
/** Minimum free space (in GB) needed for data directory */
@@ -77,8 +77,6 @@ class CChainParams
7777
bool MineBlocksOnDemand() const { return consensus.fPowNoRetargeting; }
7878
/** Return the BIP70 network string (main, test or regtest) */
7979
std::string NetworkIDString() const { return strNetworkID; }
80-
/** Return true if the fallback fee is by default enabled for this network */
81-
bool IsFallbackFeeEnabled() const { return m_fallback_fee_enabled; }
8280
/** Return the list of hostnames to look up for DNS seeds */
8381
const std::vector<std::string>& DNSSeeds() const { return vSeeds; }
8482
const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
@@ -106,7 +104,6 @@ class CChainParams
106104
bool m_is_test_chain;
107105
CCheckpointData checkpointData;
108106
ChainTxData chainTxData;
109-
bool m_fallback_fee_enabled;
110107
};
111108

112109
/**

src/chainparamsbase.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <memory>
99
#include <string>
10-
#include <vector>
1110

1211
/**
1312
* CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind)

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4409,7 +4409,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
44094409
walletInstance->m_min_fee = CFeeRate(n);
44104410
}
44114411

4412-
walletInstance->m_allow_fallback_fee = Params().IsFallbackFeeEnabled();
4412+
walletInstance->m_allow_fallback_fee = Params().IsTestChain();
44134413
if (gArgs.IsArgSet("-fallbackfee")) {
44144414
CAmount nFeePerK = 0;
44154415
if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) {

src/wallet/wallet.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <outputtype.h>
1313
#include <policy/feerate.h>
1414
#include <script/sign.h>
15-
#include <streams.h>
1615
#include <tinyformat.h>
1716
#include <ui_interface.h>
1817
#include <util/strencodings.h>

0 commit comments

Comments
 (0)