-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ethcore/src/snapshot/service.rs
Outdated
self.feed_chunk_with_restoration(&mut restoration, hash, chunk, is_state) | ||
match self.feed_chunk_with_restoration(&mut restoration, hash, chunk, is_state) { | ||
Ok(()) => (), | ||
Err(Error(SnapshotErrorKind::Snapshot(SnapshotError::RestorationAborted), _)) => (), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could unify this cases with
Ok(()) |
Err(Error(<snip>)) => (),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ethcore/src/snapshot/service.rs
Outdated
@@ -584,10 +585,19 @@ impl Service { | |||
} | |||
|
|||
/// Feed a chunk of either kind. no-op if no restoration or status is wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe update the doc-string to "Feed a chunk of either Block or Status kind. No-op if … …"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This would previously cause to delete all downloaded chunks if the snapshot was aborted while restoring a chunk.