mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Move UpdateTime to pow
This commit is contained in:
28
src/main.cpp
28
src/main.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user