mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
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
This commit is contained in:
@@ -562,7 +562,7 @@ UniValue verifychain(const UniValue& params, bool fHelp)
|
||||
if (params.size() > 1)
|
||||
nCheckDepth = params[1].get_int();
|
||||
|
||||
return CVerifyDB().VerifyDB(pcoinsTip, nCheckLevel, nCheckDepth);
|
||||
return CVerifyDB().VerifyDB(Params(), pcoinsTip, nCheckLevel, nCheckDepth);
|
||||
}
|
||||
|
||||
/** Implementation of IsSuperMajority with better feedback */
|
||||
@@ -828,7 +828,7 @@ UniValue invalidateblock(const UniValue& params, bool fHelp)
|
||||
}
|
||||
|
||||
if (state.IsValid()) {
|
||||
ActivateBestChain(state);
|
||||
ActivateBestChain(state, Params());
|
||||
}
|
||||
|
||||
if (!state.IsValid()) {
|
||||
@@ -867,7 +867,7 @@ UniValue reconsiderblock(const UniValue& params, bool fHelp)
|
||||
}
|
||||
|
||||
if (state.IsValid()) {
|
||||
ActivateBestChain(state);
|
||||
ActivateBestChain(state, Params());
|
||||
}
|
||||
|
||||
if (!state.IsValid()) {
|
||||
|
||||
Reference in New Issue
Block a user