Fix rebase conflicts
This commit is contained in:
parent
72cd68c0a4
commit
ca934b7cb5
@ -218,7 +218,10 @@ impl BlockId {
|
||||
chain: &BeaconChain<T>,
|
||||
) -> Result<Arc<BlobsSidecar<T::EthSpec>>, warp::Rejection> {
|
||||
let root = self.root(chain)?.0;
|
||||
match chain.get_blobs(&root) {
|
||||
let Some(data_availability_boundary) = chain.data_availability_boundary() else {
|
||||
return Err(warp_utils::reject::custom_not_found("Eip4844 fork disabled".into()));
|
||||
};
|
||||
match chain.get_blobs(&root, data_availability_boundary) {
|
||||
Ok(Some(blob)) => Ok(Arc::new(blob)),
|
||||
Ok(None) => Err(warp_utils::reject::custom_not_found(format!(
|
||||
"Blob with block root {} is not in the store",
|
||||
|
@ -237,11 +237,15 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
|
||||
if let Some(path) = blobs_db_path {
|
||||
let new_blob_info = if open_blobs_db {
|
||||
db.blobs_db = Some(LevelDB::open(path.as_path())?);
|
||||
Some(BlobInfo { blobs_db: true })
|
||||
let mut new_blob_info = blob_info.clone().unwrap_or_default();
|
||||
new_blob_info.blobs_db = true;
|
||||
new_blob_info
|
||||
} else {
|
||||
Some(BlobInfo { blobs_db: false })
|
||||
let mut new_blob_info = blob_info.clone().unwrap_or_default();
|
||||
new_blob_info.blobs_db = false;
|
||||
new_blob_info
|
||||
};
|
||||
db.compare_and_set_blob_info_with_write(blob_info, new_blob_info)?;
|
||||
db.compare_and_set_blob_info_with_write(blob_info, Some(new_blob_info))?;
|
||||
info!(
|
||||
db.log,
|
||||
"Blobs DB initialized";
|
||||
|
@ -126,6 +126,8 @@ pub struct BlobInfo {
|
||||
pub oldest_blob_slot: Option<Slot>,
|
||||
/// A separate blobs database is in use.
|
||||
pub blobs_db: bool,
|
||||
/// The slot after which blobs are available (>=).
|
||||
pub oldest_blob_slot: Option<Slot>,
|
||||
}
|
||||
|
||||
impl StoreItem for BlobInfo {
|
||||
|
Loading…
Reference in New Issue
Block a user