Update blockchain.go

This commit is contained in:
jagdeep sidhu 2024-10-10 12:57:08 -07:00
parent 55f01f4ff2
commit 9230d12dad

View file

@ -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.