diff --git a/core/blockchain.go b/core/blockchain.go index 8e498d417d..da3f454714 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1108,6 +1108,12 @@ func (bc *BlockChain) stopWithoutSaving() { // Stop stops the blockchain service. If any imports are currently in progress // it will abort them using the procInterrupt. func (bc *BlockChain) Stop() { + // SYSCOIN we set canonical chain if we are stopping or we have synced + if bc.NevmBlockConnect != nil { + if _, err := bc.SetCanonical(bc.NevmBlockConnect.Block); err != nil { + log.Error("Failed setting canonical chain from NEVM block connect", "err", err) + } + } bc.stopWithoutSaving() // Ensure that the entirety of the state snapshot is journaled to disk.