mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
cli/server: fix db restorer math wrt skip
Given `-s 1` with a dump of 6001 blocks it skipped the first one and then tried to import the next 6001 which failed with EOF because there are only 6000 blocks left.
This commit is contained in:
parent
b706130175
commit
ae003a1578
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ func restoreDB(ctx *cli.Context) error {
|
|||
return cli.NewExitError(fmt.Errorf("input file has only %d blocks, can't read %d starting from %d", allBlocks, count, skip), 1)
|
||||
}
|
||||
if count == 0 {
|
||||
count = allBlocks
|
||||
count = allBlocks - skip
|
||||
}
|
||||
i := uint32(0)
|
||||
for ; i < skip; i++ {
|
||||
|
|
Loading…
Reference in a new issue