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

Method SetTargetBlock

src/validation.cpp:1903–1911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1901}
1902
1903void Chainstate::SetTargetBlock(CBlockIndex* block)
1904{
1905 if (block) {
1906 m_target_blockhash = block->GetBlockHash();
1907 } else {
1908 m_target_blockhash.reset();
1909 }
1910 m_cached_target_block = block;
1911}
1912
1913void Chainstate::SetTargetBlockHash(uint256 block_hash)
1914{

Callers 2

MaybeValidateSnapshotMethod · 0.80
LoadChainstateFunction · 0.80

Calls 2

GetBlockHashMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected