forked from TrueCloudLab/neoneo-go
core: stop storage items reset after any seek error
This commit is contained in:
parent
bfe7aeae7b
commit
ecda07736e
1 changed files with 2 additions and 1 deletions
|
@ -796,13 +796,14 @@ func (bc *Blockchain) resetStateInternal(height uint32, stage stateChangeStage)
|
||||||
err = stackitem.DeserializeConvertible(v, cs)
|
err = stackitem.DeserializeConvertible(v, cs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
seekErr = fmt.Errorf("failed to deserialize contract %s state: %w", hash.StringLE(), seekErr)
|
seekErr = fmt.Errorf("failed to deserialize contract %s state: %w", hash.StringLE(), seekErr)
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
cache.PutContractID(cs.ID, hash)
|
cache.PutContractID(cs.ID, hash)
|
||||||
cnt++
|
cnt++
|
||||||
contractIDsCnt++
|
contractIDsCnt++
|
||||||
}
|
}
|
||||||
|
|
||||||
return seekErr == nil
|
return true
|
||||||
})
|
})
|
||||||
if seekErr != nil {
|
if seekErr != nil {
|
||||||
return fmt.Errorf("failed to reset contract contract storage items and IDs: %w", seekErr)
|
return fmt.Errorf("failed to reset contract contract storage items and IDs: %w", seekErr)
|
||||||
|
|
Loading…
Reference in a new issue