Prevent sync restart if import queue full (#9381)

This commit is contained in:
Andrew Jones
2018-08-24 09:42:24 +01:00
committed by GitHub
parent 31291ebd35
commit 0b34579b04
3 changed files with 35 additions and 26 deletions

View File

@@ -150,6 +150,24 @@ impl error::Error for BlockError {
}
}
error_chain! {
types {
QueueError, QueueErrorKind, QueueErrorResultExt, QueueErrorResult;
}
errors {
#[doc = "Queue is full"]
Full(limit: usize) {
description("Queue is full")
display("The queue is full ({})", limit)
}
}
foreign_links {
Channel(IoError) #[doc = "Io channel error"];
}
}
error_chain! {
types {
ImportError, ImportErrorKind, ImportErrorResultExt, ImportErrorResult;
@@ -183,6 +201,7 @@ error_chain! {
links {
Import(ImportError, ImportErrorKind) #[doc = "Import error"];
Queue(QueueError, QueueErrorKind) #[doc = "Io channel queue error"];
}
foreign_links {