MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TargetBlock

Method TargetBlock

src/validation.cpp:1896–1901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1894}
1895
1896const CBlockIndex* Chainstate::TargetBlock() const
1897{
1898 if (!m_target_blockhash) return nullptr;
1899 if (!m_cached_target_block) m_cached_target_block = Assert(m_chainman.m_blockman.LookupBlockIndex(*m_target_blockhash));
1900 return m_cached_target_block;
1901}
1902
1903void Chainstate::SetTargetBlock(CBlockIndex* block)
1904{

Callers 4

CheckBlockIndexMethod · 0.80
MaybeValidateSnapshotMethod · 0.80

Calls 1

LookupBlockIndexMethod · 0.80

Tested by

no test coverage detected