core, miner: added difficulty bomb

This commit is contained in:
Jeffrey Wilcke
2015-08-04 23:46:38 +02:00
parent 56219a5e7a
commit 71d32f54f7
6 changed files with 196 additions and 7 deletions

View File

@ -171,7 +171,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header {
Root: state.Root(),
ParentHash: parent.Hash(),
Coinbase: parent.Coinbase(),
Difficulty: CalcDifficulty(time, parent.Time(), parent.Difficulty()),
Difficulty: CalcDifficulty(time, parent.Time(), parent.Number(), parent.Difficulty()),
GasLimit: CalcGasLimit(parent),
GasUsed: new(big.Int),
Number: new(big.Int).Add(parent.Number(), common.Big1),