aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/blockchain.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 1a3708ef2..99d79519e 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1778,7 +1778,7 @@ func (bc *BlockChain) insertDexonChain(chain types.Blocks) (int, []interface{},
blockInsertTimer.UpdateSince(bstart)
events = append(events, ChainSideEvent{block})
- return 0, nil, nil, errors.New("fork round")
+ panic("fork found")
}
stats.processed++
stats.usedGas += usedGas
@@ -1917,10 +1917,7 @@ func (bc *BlockChain) processBlock(
bc.gcproc += proctime
case SideStatTy:
- log.Debug("Inserted forked block", "number", block.Number(), "hash", block.Hash(), "diff", block.Difficulty(), "elapsed",
- common.PrettyDuration(time.Since(bstart)), "txs", len(block.Transactions()), "gas", block.GasUsed(), "uncles", len(block.Uncles()))
-
- return nil, nil, nil, errors.New("fork round")
+ return nil, nil, nil, fmt.Errorf("insert pending block and fork found")
}
stats.processed++
@@ -1998,9 +1995,7 @@ func (bc *BlockChain) ProcessEmptyBlock(block *types.Block) (*common.Hash, error
bc.gcproc += proctime
case SideStatTy:
- log.Debug("Inserted forked block", "number", block.Number(), "hash", block.Hash(), "diff", block.Difficulty(), "elapsed",
- common.PrettyDuration(time.Since(bstart)), "txs", len(block.Transactions()), "gas", block.GasUsed(), "uncles", len(block.Uncles()))
- return nil, fmt.Errorf("fork found")
+ return nil, fmt.Errorf("insert pending block and fork found")
}
stats.processed++
@@ -2288,6 +2283,7 @@ func (bc *BlockChain) InsertDexonHeaderChain(chain []*types.HeaderWithGovState,
if status == SideStatTy {
log.Debug("Inserted forked block header", "number", header.Number, "hash", header.Hash, "diff", header.Difficulty,
"gas", header.GasUsed)
+ panic("fork found")
}
return err
}