MCPcopy Create free account
hub / github.com/LUX-Core/lux / SetTip

Method SetTip

src/chain.cpp:14–25  ·  view source on GitHub ↗

* CChain implementation */

Source from the content-addressed store, hash-verified

12 * CChain implementation
13 */
14void CChain::SetTip(CBlockIndex* pindex)
15{
16 if (pindex == NULL) {
17 vChain.clear();
18 return;
19 }
20 vChain.resize(pindex->nHeight + 1);
21 while (pindex && vChain[pindex->nHeight] != pindex) {
22 vChain[pindex->nHeight] = pindex;
23 pindex = pindex->pprev;
24 }
25}
26
27CBlockLocator CChain::GetLocator(const CBlockIndex* pindex) const
28{

Callers 6

UpdateTipFunction · 0.80
CheckBlockHeaderFunction · 0.80
LoadBlockIndexDBFunction · 0.80
UnloadBlockIndexFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

clearMethod · 0.45
resizeMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64