Skip to content

Commit fa462ea

Browse files
author
MarcoFalke
committed
Avoid implicit-integer-sign-change in VerifyLoadedChainstate
1 parent cf22191 commit fa462ea

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/node/chainstate.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
129129
bool fReset,
130130
bool fReindexChainState,
131131
const Consensus::Params& consensus_params,
132-
unsigned int check_blocks,
133-
unsigned int check_level,
132+
int check_blocks,
133+
int check_level,
134134
std::function<int64_t()> get_unix_time_seconds)
135135
{
136136
auto is_coinsview_empty = [&](CChainState* chainstate) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) {

src/node/chainstate.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
7979
bool fReset,
8080
bool fReindexChainState,
8181
const Consensus::Params& consensus_params,
82-
unsigned int check_blocks,
83-
unsigned int check_level,
82+
int check_blocks,
83+
int check_level,
8484
std::function<int64_t()> get_unix_time_seconds);
8585
} // namespace node
8686

test/functional/rpc_blockchain.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,14 @@ def run_test(self):
6969
self.wallet = MiniWallet(self.nodes[0])
7070
self.mine_chain()
7171
self._test_max_future_block_time()
72-
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete
72+
self.restart_node(
73+
0,
74+
extra_args=[
75+
"-stopatheight=207",
76+
"-checkblocks=-1", # Check all blocks
77+
"-prune=1", # Set pruning after rescan is complete
78+
],
79+
)
7380

7481
self._test_getblockchaininfo()
7582
self._test_getchaintxstats()

0 commit comments

Comments
 (0)