Fixed difficulty
Difficulty was broken when refactored.
This commit is contained in:
@ -242,8 +242,7 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error {
|
||||
}
|
||||
|
||||
expd := CalcDifficulty(block, parent)
|
||||
if expd.Cmp(block.Header().Difficulty) < 0 {
|
||||
fmt.Println("parent\n", parent)
|
||||
if expd.Cmp(block.Header().Difficulty) != 0 {
|
||||
return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user