MCPcopy Create free account
hub / github.com/LUX-Core/lux / verifychain

Function verifychain

src/rpcblockchain.cpp:1197–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1195}
1196
1197UniValue verifychain(const UniValue& params, bool fHelp)
1198{
1199 if (fHelp || params.size() > 2)
1200 throw runtime_error(
1201 "verifychain ( checklevel numblocks )\n"
1202 "\nVerifies blockchain database.\n"
1203 "\nArguments:\n"
1204 "1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.\n"
1205 "2. numblocks (numeric, optional, default=288, 0=all) The number of blocks to check.\n"
1206 "\nResult:\n"
1207 "true|false (boolean) Verified or not\n"
1208 "\nExamples:\n" +
1209 HelpExampleCli("verifychain", "") + HelpExampleRpc("verifychain", ""));
1210
1211 LOCK(cs_main);
1212
1213 int nCheckLevel = GetArg("-checklevel", 3);
1214 int nCheckDepth = GetArg("-checkblocks", 288);
1215 if (params.size() > 0)
1216 nCheckLevel = params[0].get_int();
1217 if (params.size() > 1)
1218 nCheckDepth = params[1].get_int();
1219
1220 return CVerifyDB().VerifyDB(Params(), pcoinsTip, nCheckLevel, nCheckDepth);
1221}
1222
1223static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
1224{

Callers

nothing calls this directly

Calls 8

HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
GetArgFunction · 0.85
CVerifyDBClass · 0.85
VerifyDBMethod · 0.80
ParamsClass · 0.70
sizeMethod · 0.45
get_intMethod · 0.45

Tested by

no test coverage detected