mirror of
https://github.com/akula-bft/akula.git
synced 2026-04-19 03:00:13 -04:00
Downloader: fix linear phase hang if saved to fast. (#111)
If a slice is verified and saved too fast, the next slice monotonic verification aborts. We can't abort on Saved slices, because they will be evicted, and so the remaining_count won't change (potentially), causing the VerifyStageLinearLink to wait forever. It is fine to abort on Invalid, because they are gonna be redownloaded, verified internally, and the remaining_count will change.
This commit is contained in:
@@ -74,7 +74,7 @@ impl VerifyStageLinearLink {
|
||||
let next_slice_lock = self.header_slices.try_fold(initial_value, |_, slice_lock| {
|
||||
let slice = slice_lock.read();
|
||||
match slice.status {
|
||||
HeaderSliceStatus::Verified | HeaderSliceStatus::Invalid => {
|
||||
HeaderSliceStatus::Verified | HeaderSliceStatus::Saved => {
|
||||
ControlFlow::Continue(None)
|
||||
}
|
||||
HeaderSliceStatus::VerifiedInternally => {
|
||||
|
||||
Reference in New Issue
Block a user