aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 2b172b15c..625bf7e3a 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -2238,7 +2238,12 @@ func (bc *BlockChain) InsertDexonHeaderChain(chain []*types.HeaderWithGovState,
whFunc := func(header *types.HeaderWithGovState) error {
bc.mu.Lock()
defer bc.mu.Unlock()
- _, err := bc.hc.WriteDexonHeader(header)
+ status, err := bc.hc.WriteDexonHeader(header)
+ 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
}