Skip to content

Commit

Permalink
No longer call ComputeMinWork()
Browse files Browse the repository at this point in the history
ConputeMinWork() should not be called anymore with the Dark Gravity Wave.
The combination of a checkpoint that was too close to the current
date and time and fast blocks from fast pools had caused a fork and
numerous banned hosts, causing them to isolate themselves into small
islands, each with their own chain.

Eventually the longest chain did indeed prevail.

This change removes the computation of date-based and block height
based minimum work, and thus removes the banning that was going on before.

This will allow more nodes to reach a consensus on the current longest
block without the numerous ban islands.
  • Loading branch information
Grynn San authored and btcdrak committed Jul 29, 2014
1 parent ed3bf5a commit fddff73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
return true;
}

#if 0
//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
Expand All @@ -184,3 +185,16 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
bnResult = bnLimit;
return bnResult.GetCompact();
}

#else

// DarkGravityWave doesn't use ComputeMinWork, but we do basic
// check here to see that at least we meet the minimum nBits
//
unsigned int ComputeMinWork(unsigned int, int64_t)
{
const uint256 &bnLimit = Params().ProofOfWorkLimit();
return bnLimit.GetCompact();
}

#endif

0 comments on commit fddff73

Please sign in to comment.