MCPcopy Create free account
hub / github.com/ElementsProject/elements / findFirstBlockWithTimeAndHeight

Method findFirstBlockWithTimeAndHeight

src/node/interfaces.cpp:504–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502 return FillBlock(m_node.chainman->m_blockman.LookupBlockIndex(hash), block, lock, active);
503 }
504 bool findFirstBlockWithTimeAndHeight(int64_t min_time, int min_height, const FoundBlock& block) override
505 {
506 WAIT_LOCK(cs_main, lock);
507 const CChain& active = Assert(m_node.chainman)->ActiveChain();
508 return FillBlock(active.FindEarliestAtLeast(min_time, min_height), block, lock, active);
509 }
510 bool findAncestorByHeight(const uint256& block_hash, int ancestor_height, const FoundBlock& ancestor_out) override
511 {
512 WAIT_LOCK(cs_main, lock);

Callers 3

RescanFromTimeMethod · 0.80
AttachChainMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

FillBlockFunction · 0.85
FindEarliestAtLeastMethod · 0.80

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64