mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Avoid implicit-integer-sign-change in VerifyLoadedChainstate
This commit is contained in:
parent
cf22191fd8
commit
fa462ea787
3 changed files with 12 additions and 5 deletions
|
@ -129,8 +129,8 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
|
||||||
bool fReset,
|
bool fReset,
|
||||||
bool fReindexChainState,
|
bool fReindexChainState,
|
||||||
const Consensus::Params& consensus_params,
|
const Consensus::Params& consensus_params,
|
||||||
unsigned int check_blocks,
|
int check_blocks,
|
||||||
unsigned int check_level,
|
int check_level,
|
||||||
std::function<int64_t()> get_unix_time_seconds)
|
std::function<int64_t()> get_unix_time_seconds)
|
||||||
{
|
{
|
||||||
auto is_coinsview_empty = [&](CChainState* chainstate) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) {
|
auto is_coinsview_empty = [&](CChainState* chainstate) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) {
|
||||||
|
|
|
@ -79,8 +79,8 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
|
||||||
bool fReset,
|
bool fReset,
|
||||||
bool fReindexChainState,
|
bool fReindexChainState,
|
||||||
const Consensus::Params& consensus_params,
|
const Consensus::Params& consensus_params,
|
||||||
unsigned int check_blocks,
|
int check_blocks,
|
||||||
unsigned int check_level,
|
int check_level,
|
||||||
std::function<int64_t()> get_unix_time_seconds);
|
std::function<int64_t()> get_unix_time_seconds);
|
||||||
} // namespace node
|
} // namespace node
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,14 @@ class BlockchainTest(BitcoinTestFramework):
|
||||||
self.wallet = MiniWallet(self.nodes[0])
|
self.wallet = MiniWallet(self.nodes[0])
|
||||||
self.mine_chain()
|
self.mine_chain()
|
||||||
self._test_max_future_block_time()
|
self._test_max_future_block_time()
|
||||||
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete
|
self.restart_node(
|
||||||
|
0,
|
||||||
|
extra_args=[
|
||||||
|
"-stopatheight=207",
|
||||||
|
"-checkblocks=-1", # Check all blocks
|
||||||
|
"-prune=1", # Set pruning after rescan is complete
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
self._test_getblockchaininfo()
|
self._test_getblockchaininfo()
|
||||||
self._test_getchaintxstats()
|
self._test_getchaintxstats()
|
||||||
|
|
Loading…
Add table
Reference in a new issue