update statistics (does not update nSize) */
| 535 | |
| 536 | /** update statistics (does not update nSize) */ |
| 537 | void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn) { |
| 538 | if (nBlocks==0 || nHeightFirst > nHeightIn) |
| 539 | nHeightFirst = nHeightIn; |
| 540 | if (nBlocks==0 || nTimeFirst > nTimeIn) |
| 541 | nTimeFirst = nTimeIn; |
| 542 | nBlocks++; |
| 543 | if (nHeightIn > nHeightLast) |
| 544 | nHeightLast = nHeightIn; |
| 545 | if (nTimeIn > nTimeLast) |
| 546 | nTimeLast = nTimeIn; |
| 547 | } |
| 548 | }; |
| 549 | |
| 550 | /** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */ |