iuna

iuna

iuna - experimental mainnet-candidate protocol
git clone https://getiuna.org/git/iuna.git
Log | Files | Refs | README | LICENSE

error.rs (470B)


      1 use std::{error::Error, fmt};
      2 
      3 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
      4 pub(super) enum SyncError {
      5     BlockPageHasNoCommonAncestor,
      6 }
      7 
      8 impl fmt::Display for SyncError {
      9     fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
     10         match self {
     11             Self::BlockPageHasNoCommonAncestor => {
     12                 formatter.write_str("block page has no common ancestor with local chain")
     13             }
     14         }
     15     }
     16 }
     17 
     18 impl Error for SyncError {}