mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Add fork choice persistence
This commit is contained in:
@@ -54,7 +54,7 @@ pub trait LmdGhost<S: Store, E: EthSpec>: Send + Sync + Sized {
|
||||
fn verify_integrity(&self) -> Result<()>;
|
||||
|
||||
/// Encode the `LmdGhost` instance to bytes.
|
||||
fn as_bytes(self) -> Vec<u8>;
|
||||
fn as_bytes(&self) -> Vec<u8>;
|
||||
|
||||
/// Create a new `LmdGhost` instance given a `store` and encoded bytes.
|
||||
fn from_bytes(bytes: &[u8], store: Arc<S>) -> Result<Self>;
|
||||
|
||||
@@ -121,8 +121,8 @@ where
|
||||
}
|
||||
|
||||
/// Consume the `ReducedTree` object and return its ssz encoded bytes representation.
|
||||
fn as_bytes(self) -> Vec<u8> {
|
||||
self.core.into_inner().as_bytes()
|
||||
fn as_bytes(&self) -> Vec<u8> {
|
||||
self.core.read().as_bytes()
|
||||
}
|
||||
|
||||
/// Create a new `ThreadSafeReducedTree` instance from a `store` and the
|
||||
|
||||
Reference in New Issue
Block a user