diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index bfe44143b..d0c0a4007 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -705,9 +705,11 @@ func (bc *Blockchain) storeBlock(block *block.Block, txpool *mempool.Pool) error return err } if err := bc.contracts.Policy.OnPersistEnd(bc.dao); err != nil { + bc.lock.Unlock() return fmt.Errorf("failed to call OnPersistEnd for Policy native contract: %w", err) } if err := bc.contracts.Designate.OnPersistEnd(bc.dao); err != nil { + bc.lock.Unlock() return err } bc.dao.MPT.Flush()