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

Method AddBlock

src/persistence/disk.cpp:20–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void CBlockFileInfo::AddBlock(uint32_t nHeightIn, uint64_t nTimeIn) {
21 if (nBlocks == 0 || nHeightFirst > nHeightIn)
22 nHeightFirst = nHeightIn;
23
24 if (nBlocks == 0 || nTimeFirst > nTimeIn)
25 nTimeFirst = nTimeIn;
26
27 nBlocks++;
28
29 if (nHeightIn > nHeightLast)
30 nHeightLast = nHeightIn;
31
32 if (nTimeIn > nTimeLast)
33 nTimeLast = nTimeIn;
34}
35
36////////////////////////////////////////////////////////////////////////////////
37// global functions

Callers 1

FindBlockPosFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected