| 46 | uint64_t nLastBlockSize = 0; |
| 47 | |
| 48 | void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev) |
| 49 | { |
| 50 | pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime()); |
| 51 | |
| 52 | // Updating time can change work required on testnet: |
| 53 | if (consensusParams.fPowAllowMinDifficultyBlocks) |
| 54 | pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams); |
| 55 | } |
| 56 | |
| 57 | // BIP100 string: |
| 58 | // - Adds our block size vote (B) if configured. |
no test coverage detected