mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 03:41:34 +00:00
core: stop storage items reset after the first persist error
It's a bug, we mustn't continue if something bad had happend on persist, otherwise this error will be overwritten by subsequent successfull persist.
This commit is contained in:
parent
235518eb6c
commit
bfe7aeae7b
1 changed files with 3 additions and 0 deletions
|
@ -770,6 +770,9 @@ func (bc *Blockchain) resetStateInternal(height uint32, stage stateChangeStage)
|
|||
contractIDsCnt int
|
||||
)
|
||||
trieStore.Seek(storage.SeekRange{Prefix: []byte{byte(oldStoragePrefix)}}, func(k, v []byte) bool {
|
||||
if seekErr != nil {
|
||||
return false
|
||||
}
|
||||
if cnt >= persistBatchSize {
|
||||
cnt = 0
|
||||
keys, seekErr = cache.Persist()
|
||||
|
|
Loading…
Reference in a new issue