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

Method AddBlock

src/chain.h:87–98  ·  view source on GitHub ↗

update statistics (does not update nSize) */

Source from the content-addressed store, hash-verified

85
86 /** update statistics (does not update nSize) */
87 void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn)
88 {
89 if (nBlocks == 0 || nHeightFirst > nHeightIn)
90 nHeightFirst = nHeightIn;
91 if (nBlocks == 0 || nTimeFirst > nTimeIn)
92 nTimeFirst = nTimeIn;
93 nBlocks++;
94 if (nHeightIn > nHeightLast)
95 nHeightLast = nHeightIn;
96 if (nTimeIn > nTimeLast)
97 nTimeLast = nTimeIn;
98 }
99};
100
101enum BlockStatus : uint32_t {

Callers 1

FindBlockPosMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected