| 271 | } |
| 272 | |
| 273 | Value verifychain(const Array& params, bool fHelp) { |
| 274 | if (fHelp || params.size() > 2) { |
| 275 | throw runtime_error( |
| 276 | "verifychain ( checklevel numofblocks )\n" |
| 277 | "\nVerifies blockchain database.\n" |
| 278 | "\nArguments:\n" |
| 279 | "1.\"checklevel\" (numeric, optional, 0-4, default=3) How thorough the block verification is.\n" |
| 280 | "2.\"numofblocks\" (numeric, optional, default=1288, 0=all) The number of blocks to check.\n" |
| 281 | "\nResult:\n" |
| 282 | "true|false (boolean) Verified Okay or not\n" |
| 283 | "\nExamples:\n" + |
| 284 | HelpExampleCli("verifychain", "") + "\nAs json rpc\n" + HelpExampleRpc("verifychain", "4, 10000")); |
| 285 | } |
| 286 | |
| 287 | int nCheckLevel = SysCfg().GetArg("-checklevel", 3); |
| 288 | int nCheckDepth = SysCfg().GetArg("-checkblocks", 1288); |
| 289 | if (params.size() > 0) |
| 290 | nCheckLevel = params[0].get_int(); |
| 291 | if (params.size() > 1) |
| 292 | nCheckDepth = params[1].get_int(); |
| 293 | |
| 294 | return VerifyDB(nCheckLevel, nCheckDepth); |
| 295 | } |
| 296 | |
| 297 | Value getcontractregid(const Array& params, bool fHelp) { |
| 298 | if (fHelp || params.size() != 1) { |
nothing calls this directly
no test coverage detected