MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / UpdateLocalFinBlock

Method UpdateLocalFinBlock

src/miner/pbftmanager.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 return true;
68}
69bool CPBFTMan::UpdateLocalFinBlock(const uint32_t height) {
70 {
71 LOCK(cs_finblock);
72 CBlockIndex* oldFinblock = GetLocalFinIndex();
73 if (oldFinblock != nullptr && (uint32_t)oldFinblock->height >= height)
74 return false;
75 CBlockIndex* pTemp = chainActive[height];
76 if (pTemp== nullptr)
77 return false;
78
79 localFinIndex = pTemp;
80 localFinLastUpdate = GetTime();
81 return true;
82 }
83
84}
85
86bool CPBFTMan::UpdateGlobalFinBlock(const uint32_t height) {
87 {

Callers 2

AcceptBlockFunction · 0.80

Calls 7

GetTimeFunction · 0.85
GetFinalBlockMinerCountFunction · 0.85
GetBlockHashMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected