Remove rocksdb dependency from result.rs
This commit is contained in:
@ -20,10 +20,17 @@ pub const DB_LEDGER_DIRECTORY: &str = "rocksdb";
|
|||||||
// A good value for this is the number of cores on the machine
|
// A good value for this is the number of cores on the machine
|
||||||
pub const TOTAL_THREADS: i32 = 8;
|
pub const TOTAL_THREADS: i32 = 8;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug)]
|
||||||
pub enum DbLedgerError {
|
pub enum DbLedgerError {
|
||||||
BlobForIndexExists,
|
BlobForIndexExists,
|
||||||
InvalidBlobData,
|
InvalidBlobData,
|
||||||
|
RocksDb(rocksdb::Error),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::convert::From<rocksdb::Error> for Error {
|
||||||
|
fn from(e: rocksdb::Error) -> Error {
|
||||||
|
Error::DbLedgerError(DbLedgerError::RocksDb(e))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait LedgerColumnFamily {
|
pub trait LedgerColumnFamily {
|
||||||
|
@ -9,7 +9,6 @@ use crate::packet;
|
|||||||
use crate::poh_recorder;
|
use crate::poh_recorder;
|
||||||
use crate::vote_stage;
|
use crate::vote_stage;
|
||||||
use bincode;
|
use bincode;
|
||||||
use rocksdb;
|
|
||||||
use serde_json;
|
use serde_json;
|
||||||
use std;
|
use std;
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
@ -31,7 +30,6 @@ pub enum Error {
|
|||||||
SendError,
|
SendError,
|
||||||
PohRecorderError(poh_recorder::PohRecorderError),
|
PohRecorderError(poh_recorder::PohRecorderError),
|
||||||
VoteError(vote_stage::VoteError),
|
VoteError(vote_stage::VoteError),
|
||||||
RocksDb(rocksdb::Error),
|
|
||||||
DbLedgerError(db_ledger::DbLedgerError),
|
DbLedgerError(db_ledger::DbLedgerError),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,11 +109,6 @@ impl std::convert::From<vote_stage::VoteError> for Error {
|
|||||||
Error::VoteError(e)
|
Error::VoteError(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl std::convert::From<rocksdb::Error> for Error {
|
|
||||||
fn from(e: rocksdb::Error) -> Error {
|
|
||||||
Error::RocksDb(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl std::convert::From<db_ledger::DbLedgerError> for Error {
|
impl std::convert::From<db_ledger::DbLedgerError> for Error {
|
||||||
fn from(e: db_ledger::DbLedgerError) -> Error {
|
fn from(e: db_ledger::DbLedgerError) -> Error {
|
||||||
Error::DbLedgerError(e)
|
Error::DbLedgerError(e)
|
||||||
|
Reference in New Issue
Block a user