Bitcoin Core  22.99.0
P2P Digital Currency
validation.cpp
Go to the documentation of this file.
1 // Copyright (c) 2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <test/util/validation.h>
6 
7 #include <util/check.h>
8 #include <util/time.h>
9 #include <validation.h>
10 
12 {
13  m_cached_finished_ibd = false;
14  assert(IsInitialBlockDownload());
15 }
16 
18 {
19  Assert(IsInitialBlockDownload());
20  m_cached_finished_ibd = true;
21  Assert(!IsInitialBlockDownload());
22 }
assert
assert(!tx.IsCoinBase())
check.h
TestChainState::ResetIbd
void ResetIbd()
Reset the ibd cache to its initial state.
Definition: validation.cpp:11
Assert
#define Assert(val)
Identity function.
Definition: check.h:57
CChainState::m_cached_finished_ibd
std::atomic< bool > m_cached_finished_ibd
Whether this chainstate is undergoing initial block download.
Definition: validation.h:572
validation.h
time.h
TestChainState::JumpOutOfIbd
void JumpOutOfIbd()
Toggle IsInitialBlockDownload from true to false.
Definition: validation.cpp:17