mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Clean up database abstractions (#1200)
* Remove redundant method * Pull out a method out of a struct * More precise db access abstractions * Move fake trait method out of it * cargo fmt * Fix compilation error after refactoring * Move another fake method out the Store trait * Get rid of superfluous method * Fix refactoring bug * Rename: SimpleStoreItem -> StoreItem * Get rid of the confusing DiskStore type alias * Get rid of SimpleDiskStore type alias * Correction: A method took both self and a ref to Self
This commit is contained in:
@@ -10,7 +10,7 @@ use std::collections::HashMap;
|
||||
use std::iter::DoubleEndedIterator;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use store::{DBColumn, Error as StoreError, SimpleStoreItem, Store};
|
||||
use store::{DBColumn, Error as StoreError, Store, StoreItem};
|
||||
use types::{
|
||||
BeaconState, BeaconStateError, ChainSpec, Deposit, Eth1Data, EthSpec, Hash256, Slot, Unsigned,
|
||||
DEPOSIT_TREE_DEPTH,
|
||||
@@ -59,7 +59,7 @@ pub struct SszEth1 {
|
||||
backend_bytes: Vec<u8>,
|
||||
}
|
||||
|
||||
impl SimpleStoreItem for SszEth1 {
|
||||
impl StoreItem for SszEth1 {
|
||||
fn db_column() -> DBColumn {
|
||||
DBColumn::Eth1Cache
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user