diff --git a/core/block_processor.go b/core/block_processor.go index 127e9792118795f21c45a73c792e6dbd3c1b131e..233e5e4db382d924f69b52f8f223f7255d4c4e07 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -264,6 +264,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) return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) } diff --git a/core/chain_manager.go b/core/chain_manager.go index 82b17cd931cb2f1315e57a676f697d875a1f9796..e73ea63788fc72f2ae01ac151ed987668098f064 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -25,7 +25,7 @@ func CalcDifficulty(block, parent *types.Block) *big.Int { bh, ph := block.Header(), parent.Header() adjust := new(big.Int).Rsh(ph.Difficulty, 10) - if bh.Time >= ph.Time+5 { + if bh.Time >= ph.Time+13 { diff.Sub(ph.Difficulty, adjust) } else { diff.Add(ph.Difficulty, adjust) diff --git a/eth/protocol.go b/eth/protocol.go index 723ab5502e4c8f13dd92c8ff47cb7788acddcb26..736bcd94bbbce43979875c82cee6a141e3358ebe 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -122,7 +122,7 @@ func (self *ethProtocol) handle() error { defer msg.Discard() switch msg.Code { - + case GetTxMsg: // ignore case StatusMsg: return self.protoError(ErrExtraStatusMsg, "")