mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
cli: persist restored blocks on exit
Add grace context to execute defer's on exit.
This commit is contained in:
parent
8cb9e1d85d
commit
c880435c92
2 changed files with 15 additions and 6 deletions
|
@ -111,10 +111,6 @@ func (d *dump) add(index uint32, batch *storage.MemBatch) {
|
|||
}
|
||||
|
||||
func (d *dump) tryPersist(prefix string, index uint32) error {
|
||||
if index%1000 != 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
f, err := createFile(prefix, index)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue