aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 82e3b6c..208a026 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1420,7 +1420,7 @@ func (bc *BlockChain) writeKnownBlock(block *types.Block) error {
defer bc.wg.Done()
current := bc.CurrentBlock()
- if block.ParentHash() != current.Hash() {
+ if !bc.manualCanonical && block.ParentHash() != current.Hash() {
if err := bc.reorg(current, block); err != nil {
return err
}
@@ -2051,6 +2051,7 @@ func (bc *BlockChain) insertSideChain(block *types.Block, it *insertIterator) (i
// blocks and inserts them to be part of the new canonical chain and accumulates
// potential missing transactions and post an event about them.
func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
+ log.Error("reorg shouldn't happen!!!")
var (
newChain types.Blocks
oldChain types.Blocks