mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
Merge pull request #486 from nspcc-dev/dump-restore-skip-fix
cli: fix skip usage in DB dump/restore
This commit is contained in:
commit
5c8fb1fc8e
1 changed files with 2 additions and 2 deletions
|
@ -168,7 +168,7 @@ func dumpDB(ctx *cli.Context) error {
|
|||
count = chainHeight - skip
|
||||
}
|
||||
writer.WriteLE(count)
|
||||
for i := skip + 1; i <= count; i++ {
|
||||
for i := skip + 1; i <= skip+count; i++ {
|
||||
bh := chain.GetHeaderHash(int(i))
|
||||
b, err := chain.GetBlock(bh)
|
||||
if err != nil {
|
||||
|
@ -227,7 +227,7 @@ func restoreDB(ctx *cli.Context) error {
|
|||
return cli.NewExitError(err, 1)
|
||||
}
|
||||
}
|
||||
for ; i < count; i++ {
|
||||
for ; i < skip+count; i++ {
|
||||
b := &core.Block{}
|
||||
b.DecodeBinary(reader)
|
||||
if reader.Err != nil {
|
||||
|
|
Loading…
Reference in a new issue