Fix try_prune_blobs to use state root

This commit is contained in:
Emilia Hane
2023-01-13 16:04:29 +01:00
parent d67468d737
commit 667cca5cf2
3 changed files with 42 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
use crate::{DBColumn, Error, StoreItem};
use crate::{DBColumn, Error, Split, StoreItem};
use serde_derive::{Deserialize, Serialize};
use ssz::{Decode, Encode};
use ssz_derive::{Decode, Encode};
@@ -124,14 +124,12 @@ impl StoreItem for AnchorInfo {
pub struct BlobInfo {
/// The latest epoch that blobs were pruned.
pub last_pruned_epoch: Epoch,
/// The block root of the next blobs to prune from.
pub data_availability_boundary: Option<Hash256>,
/// The block root of the next blob that needs to be added to fill in the history.
pub oldest_blob_parent: Hash256,
/// The next epoch to prune blobs from.
pub next_epoch_to_prune: Epoch,
/// The state root and slot of the next blobs to prune from.
pub data_availability_boundary: Split,
/// The slot before which blobs are available.
pub oldest_blob_slot: Slot,
/// The slot from which blobs are available.
pub latest_blob_slot: Slot,
}
impl StoreItem for BlobInfo {