aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-04-17 14:40:24 +0200
committerJorge Timón <jtimon@jtimon.cc>2015-11-23 12:14:40 +0100
commit2e29e7e247b6b74502c70612dab1f7f67de675c3 (patch)
treec5e4e5a8d5364f501af5f7664b731e6f10cb0589 /src/test
parenteac53ec992018a14db6f8a65a7ce333a4c8284cc (diff)
Globals: Remove a bunch of Params() calls from main.cpp:
1) Chainparams: Explicit CChainParams arg for main: -AcceptBlock -AcceptBlockHeader -ActivateBestChain -ConnectTip -InitBlockIndex -LoadExternalBlockFile -VerifyDB parametric constructor 2) Also pickup more Params()\. in main.cpp 3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_bitcoin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 319e63ba55..816abd9281 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -50,6 +50,7 @@ BasicTestingSetup::~BasicTestingSetup()
TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(chainName)
{
+ const CChainParams& chainparams = Params();
#ifdef ENABLE_WALLET
bitdb.MakeMock();
#endif
@@ -60,7 +61,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
- InitBlockIndex();
+ InitBlockIndex(chainparams);
#ifdef ENABLE_WALLET
bool fFirstRun;
pwalletMain = new CWallet("wallet.dat");