Skip to content

Commit

Permalink
fix: remove unused error invariants
Browse files Browse the repository at this point in the history
  • Loading branch information
polydez committed Apr 4, 2024
1 parent d53ec2f commit 30441e0
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions store/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rusqlite::types::FromSqlError;
use thiserror::Error;
use tokio::sync::oneshot::error::RecvError;

use crate::types::{AccountId, BlockNumber};
use crate::types::BlockNumber;

// INTERNAL ERRORS
// =================================================================================================
Expand Down Expand Up @@ -46,14 +46,8 @@ pub enum DatabaseError {
InteractError(String),
#[error("Deserialization of BLOB data from database failed: {0}")]
DeserializationError(DeserializationError),
#[error("Corrupted data: {0}")]
CorruptedData(String),
#[error("Account error: {0}")]
AccountError(AccountError),
#[error("Block applying was broken because of closed channel on state side: {0}")]
ApplyBlockFailedClosedChannel(RecvError),
#[error("Public account ({0}) details not found on-chain")]
AccountNotOnChain(AccountId),
}

impl From<DeserializationError> for DatabaseError {
Expand All @@ -62,12 +56,6 @@ impl From<DeserializationError> for DatabaseError {
}
}

impl From<AccountError> for DatabaseError {
fn from(value: AccountError) -> Self {
Self::AccountError(value)
}
}

// INITIALIZATION ERRORS
// =================================================================================================

Expand Down

0 comments on commit 30441e0

Please sign in to comment.