mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
core: fix locking in storeBlock
This commit is contained in:
parent
52cf328296
commit
97069a05d5
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue