Move UpdateTime to pow

This commit is contained in:
jtimon
2014-06-28 14:03:06 +02:00
parent 92b3d3630d
commit c2c02f3fa9
6 changed files with 15 additions and 33 deletions

View File

@@ -1419,25 +1419,6 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
}
}
void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev)
{
block.nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
// Updating time can change work required on testnet:
if (Params().AllowMinDifficultyBlocks())
block.nBits = GetNextWorkRequired(pindexPrev, &block);
}
void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)
{
bool ret;
@@ -3291,15 +3272,6 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
return nLoaded > 0;
}
//////////////////////////////////////////////////////////////////////////////
//
// CAlert