aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-09-17 13:31:23 -0400
committerDeterminant <[email protected]>2020-09-17 13:31:23 -0400
commit95ae4c9b65db88021c40f1aa90541001cfad5cda (patch)
treec403d495e2ec1008f1c04229fce5f3554fc25c56 /core
parent9a7005df93a88378981c84793769de9b57a67b53 (diff)
disable reorg entirely
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