1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[derive(PartialEq, Eq)]
pub enum OffchainErr {
OffchainStore,
SubmitTransaction,
NotValidator,
OffchainLock,
}
impl sp_std::fmt::Debug for OffchainErr {
fn fmt(&self, fmt: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
match *self {
OffchainErr::OffchainStore => write!(fmt, "Failed to manipulate offchain store"),
OffchainErr::SubmitTransaction => write!(fmt, "Failed to submit transaction"),
OffchainErr::NotValidator => write!(fmt, "Is not validator"),
OffchainErr::OffchainLock => write!(fmt, "Failed to manipulate offchain lock"),
}
}
}