mirror of
https://github.com/jwinterm/myriadcoin.git
synced 2026-12-02 12:33:54 +01:00
Chain work modify
This commit is contained in:
+2
-2
@@ -2453,14 +2453,14 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
|
||||
int nAlgo = block.GetAlgo();
|
||||
int nAlgoCount = 1;
|
||||
CBlockIndex* piPrev = pindexPrev;
|
||||
while (piPrev && (nAlgoCount < nBlockSequentialAlgoMaxCount))
|
||||
while (piPrev && (nAlgoCount <= nBlockSequentialAlgoMaxCount))
|
||||
{
|
||||
if (piPrev->GetAlgo() != nAlgo)
|
||||
break;
|
||||
nAlgoCount++;
|
||||
piPrev = piPrev->pprev;
|
||||
}
|
||||
if (nAlgoCount >= nBlockSequentialAlgoMaxCount)
|
||||
if (nAlgoCount > nBlockSequentialAlgoMaxCount)
|
||||
{
|
||||
return state.DoS(100, error("AcceptBlock() : too many blocks from same algo"),
|
||||
REJECT_INVALID, "algo-toomany");
|
||||
|
||||
+1
-1
@@ -690,7 +690,7 @@ enum BlockStatus {
|
||||
const int64_t nBlockAlgoWorkWeightStart = 142000; // block where algo work weighting starts
|
||||
const int64_t nBlockAlgoNormalisedWorkStart = 633800; // block where algo combined weight starts
|
||||
const int64_t nBlockSequentialAlgoRuleStart = 633800; // block where sequential algo rule starts
|
||||
const int nBlockSequentialAlgoMaxCount = 8; // maximum sequential blocks of same algo
|
||||
const int nBlockSequentialAlgoMaxCount = 6; // maximum sequential blocks of same algo
|
||||
|
||||
/** The block chain is a tree shaped structure starting with the
|
||||
* genesis block at the root, with each block potentially having multiple
|
||||
|
||||
Reference in New Issue
Block a user