update statistics (does not update nSize) */
| 791 | |
| 792 | /** update statistics (does not update nSize) */ |
| 793 | void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn) |
| 794 | { |
| 795 | if (nBlocks == 0 || nHeightFirst > nHeightIn) |
| 796 | nHeightFirst = nHeightIn; |
| 797 | if (nBlocks == 0 || nTimeFirst > nTimeIn) |
| 798 | nTimeFirst = nTimeIn; |
| 799 | nBlocks++; |
| 800 | if (nHeightIn > nHeightLast) |
| 801 | nHeightLast = nHeightIn; |
| 802 | if (nTimeIn > nTimeLast) |
| 803 | nTimeLast = nTimeIn; |
| 804 | } |
| 805 | }; |
| 806 | |
| 807 | /** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */ |