mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 20:02:43 +00:00
Merge branch 'unstable' into electra-alpha7
This commit is contained in:
@@ -44,7 +44,6 @@ use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use types::data_column_sidecar::{ColumnIndex, DataColumnSidecar, DataColumnSidecarList};
|
||||
use types::light_client_update::CurrentSyncCommitteeProofLen;
|
||||
use types::*;
|
||||
|
||||
/// On-disk database that stores finalized states efficiently.
|
||||
@@ -641,15 +640,14 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
pub fn get_sync_committee_branch(
|
||||
&self,
|
||||
block_root: &Hash256,
|
||||
) -> Result<Option<FixedVector<Hash256, CurrentSyncCommitteeProofLen>>, Error> {
|
||||
) -> Result<Option<MerkleProof>, Error> {
|
||||
let column = DBColumn::SyncCommitteeBranch;
|
||||
|
||||
if let Some(bytes) = self
|
||||
.hot_db
|
||||
.get_bytes(column.into(), &block_root.as_ssz_bytes())?
|
||||
{
|
||||
let sync_committee_branch: FixedVector<Hash256, CurrentSyncCommitteeProofLen> =
|
||||
FixedVector::from_ssz_bytes(&bytes)?;
|
||||
let sync_committee_branch = Vec::<Hash256>::from_ssz_bytes(&bytes)?;
|
||||
return Ok(Some(sync_committee_branch));
|
||||
}
|
||||
|
||||
@@ -677,7 +675,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
pub fn store_sync_committee_branch(
|
||||
&self,
|
||||
block_root: Hash256,
|
||||
sync_committee_branch: &FixedVector<Hash256, CurrentSyncCommitteeProofLen>,
|
||||
sync_committee_branch: &MerkleProof,
|
||||
) -> Result<(), Error> {
|
||||
let column = DBColumn::SyncCommitteeBranch;
|
||||
self.hot_db.put_bytes(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::{set_gauge, try_create_int_gauge, *};
|
||||
pub use metrics::{set_gauge, try_create_int_gauge, *};
|
||||
|
||||
use directory::size_of_dir;
|
||||
use std::path::Path;
|
||||
|
||||
Reference in New Issue
Block a user