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

Method AddBlock

src/node/blockstorage.h:86–97  ·  view source on GitHub ↗

update statistics (does not update nSize) */

Source from the content-addressed store, hash-verified

84
85 /** update statistics (does not update nSize) */
86 void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn)
87 {
88 if (nBlocks == 0 || nHeightFirst > nHeightIn)
89 nHeightFirst = nHeightIn;
90 if (nBlocks == 0 || nTimeFirst > nTimeIn)
91 nTimeFirst = nTimeIn;
92 nBlocks++;
93 if (nHeightIn > nHeightLast)
94 nHeightLast = nHeightIn;
95 if (nTimeIn > nTimeLast)
96 nTimeLast = nTimeIn;
97 }
98};
99
100/** Access to the block database (blocks/index/) */

Callers 2

FindNextBlockPosMethod · 0.80
UpdateBlockInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected