mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
rpc: Fix implicit-integer-sign-change in verifychain
This commit is contained in:
@@ -1417,7 +1417,7 @@ static RPCHelpMan verifychain()
|
|||||||
},
|
},
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
const int check_level(request.params[0].isNull() ? DEFAULT_CHECKLEVEL : request.params[0].get_int());
|
const int check_level{request.params[0].isNull() ? DEFAULT_CHECKLEVEL : request.params[0].get_int()};
|
||||||
const int check_depth{request.params[1].isNull() ? DEFAULT_CHECKBLOCKS : request.params[1].get_int()};
|
const int check_depth{request.params[1].isNull() ? DEFAULT_CHECKBLOCKS : request.params[1].get_int()};
|
||||||
|
|
||||||
ChainstateManager& chainman = EnsureAnyChainman(request.context);
|
ChainstateManager& chainman = EnsureAnyChainman(request.context);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ static const int DEFAULT_STOPATHEIGHT = 0;
|
|||||||
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */
|
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */
|
||||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
||||||
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
||||||
static const unsigned int DEFAULT_CHECKLEVEL = 3;
|
static constexpr int DEFAULT_CHECKLEVEL{3};
|
||||||
// Require that user allocate at least 550 MiB for block & undo files (blk???.dat and rev???.dat)
|
// Require that user allocate at least 550 MiB for block & undo files (blk???.dat and rev???.dat)
|
||||||
// At 1MB per block, 288 blocks = 288MB.
|
// At 1MB per block, 288 blocks = 288MB.
|
||||||
// Add 15% for Undo data = 331MB
|
// Add 15% for Undo data = 331MB
|
||||||
|
|||||||
Reference in New Issue
Block a user