@@ -49,7 +49,6 @@ public:
|
|||||||
consensus.nPowMaxAdjustDown = 32; // 32% adjustment down
|
consensus.nPowMaxAdjustDown = 32; // 32% adjustment down
|
||||||
consensus.nPowMaxAdjustUp = 16; // 16% adjustment up
|
consensus.nPowMaxAdjustUp = 16; // 16% adjustment up
|
||||||
consensus.nPowTargetSpacing = 2.5 * 60;
|
consensus.nPowTargetSpacing = 2.5 * 60;
|
||||||
consensus.fPowAllowMinDifficultyBlocks = false;
|
|
||||||
/**
|
/**
|
||||||
* The message start string should be awesome! ⓩ❤
|
* The message start string should be awesome! ⓩ❤
|
||||||
*/
|
*/
|
||||||
@@ -211,7 +210,6 @@ public:
|
|||||||
consensus.nMajorityWindow = 400;
|
consensus.nMajorityWindow = 400;
|
||||||
consensus.powLimit = uint256S("07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
consensus.powLimit = uint256S("07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||||
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
|
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
|
||||||
consensus.fPowAllowMinDifficultyBlocks = true;
|
|
||||||
pchMessageStart[0] = 0xfa;
|
pchMessageStart[0] = 0xfa;
|
||||||
pchMessageStart[1] = 0x1a;
|
pchMessageStart[1] = 0x1a;
|
||||||
pchMessageStart[2] = 0xf9;
|
pchMessageStart[2] = 0xf9;
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ struct Params {
|
|||||||
int nMajorityWindow;
|
int nMajorityWindow;
|
||||||
/** Proof of work parameters */
|
/** Proof of work parameters */
|
||||||
uint256 powLimit;
|
uint256 powLimit;
|
||||||
bool fPowAllowMinDifficultyBlocks;
|
|
||||||
int64_t nPowAveragingWindow;
|
int64_t nPowAveragingWindow;
|
||||||
int64_t nPowMaxAdjustDown;
|
int64_t nPowMaxAdjustDown;
|
||||||
int64_t nPowMaxAdjustUp;
|
int64_t nPowMaxAdjustUp;
|
||||||
|
|||||||
@@ -100,10 +100,6 @@ public:
|
|||||||
void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
|
void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
|
||||||
{
|
{
|
||||||
pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
|
pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
|
||||||
|
|
||||||
// Updating time can change work required on testnet:
|
|
||||||
if (consensusParams.fPowAllowMinDifficultyBlocks)
|
|
||||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||||
@@ -714,11 +710,6 @@ void static BitcoinMiner()
|
|||||||
// Update nNonce and nTime
|
// Update nNonce and nTime
|
||||||
pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1);
|
pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1);
|
||||||
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
|
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
|
||||||
if (chainparams.GetConsensus().fPowAllowMinDifficultyBlocks)
|
|
||||||
{
|
|
||||||
// Changing pblock->nTime can change work required on testnet:
|
|
||||||
hashTarget.SetCompact(pblock->nBits);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user