Skip to content

Commit

Permalink
stop in unmarshaling error
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcb9ff9 committed Feb 13, 2023
1 parent 6472f6c commit 9c975d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions archive/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,8 @@ func processExport(
err = blk.UnmarshalRLP(resp.Data)
if err != nil {
logger.Error("Failed to unmarshal block", "Number", num, "err", err)
time.Sleep(1 * time.Second)

continue
return
}

if blk.Number() != num {
Expand All @@ -270,7 +269,7 @@ func processExport(
return from, current, nil
}

// tips: writer.Write() not necessarily write all data, use io.Copy() instead
// tips: writer.Write() does not necessarily write all data, use io.Copy() instead
if _, err := io.Copy(writer, bytes.NewBuffer(block.MarshalRLP())); err != nil {
return from, current, err
}
Expand Down

0 comments on commit 9c975d6

Please sign in to comment.