Merge pull request #1588 from obscuren/diff-bomb

core, miner: added difficulty bomb
This commit is contained in:
Jeffrey Wilcke
2015-08-05 04:26:57 -07:00
6 changed files with 196 additions and 7 deletions

View File

@ -445,7 +445,7 @@ func (self *worker) commitNewWork() {
header := &types.Header{
ParentHash: parent.Hash(),
Number: num.Add(num, common.Big1),
Difficulty: core.CalcDifficulty(uint64(tstamp), parent.Time(), parent.Difficulty()),
Difficulty: core.CalcDifficulty(uint64(tstamp), parent.Time(), parent.Number(), parent.Difficulty()),
GasLimit: core.CalcGasLimit(parent),
GasUsed: new(big.Int),
Coinbase: self.coinbase,