Fix rebase conflict
This commit is contained in:
parent
28e1e635c3
commit
a211e6afee
@ -1074,12 +1074,24 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
) -> Result<Option<BlobsSidecar<T::EthSpec>>, Error> {
|
||||
match self.store.get_blobs(block_root)? {
|
||||
Some(blobs) => Ok(Some(blobs)),
|
||||
<<<<<<< HEAD
|
||||
None => {
|
||||
// Check for the corresponding block to understand whether we *should* have blobs.
|
||||
self.get_blinded_block(block_root)?
|
||||
.map(|block| {
|
||||
// If there are no KZG commitments in the block, we know the sidecar should
|
||||
// be empty.
|
||||
=======
|
||||
None => match self.get_blinded_block(block_root)? {
|
||||
Some(block) => {
|
||||
let current_slot = self.slot()?;
|
||||
let current_epoch = current_slot.epoch(T::EthSpec::slots_per_epoch());
|
||||
|
||||
if block.slot().epoch(T::EthSpec::slots_per_epoch())
|
||||
+ *MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS
|
||||
>= current_epoch
|
||||
{
|
||||
>>>>>>> 292426505 (Improve syntax)
|
||||
let expected_kzg_commitments =
|
||||
match block.message().body().blob_kzg_commitments() {
|
||||
Ok(kzg_commitments) => kzg_commitments,
|
||||
|
@ -1694,21 +1694,27 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
pub fn try_prune_blobs(&self, force: bool) -> Result<(), Error> {
|
||||
let mut blob_info: BlobInfo;
|
||||
|
||||
if let Some(old_blob_info) = self.get_blob_info() {
|
||||
blob_info = old_blob_info;
|
||||
} else {
|
||||
return Ok(());
|
||||
match self.get_blob_info() {
|
||||
Some(old_blob_info) => {
|
||||
blob_info = old_blob_info;
|
||||
}
|
||||
None => {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
let data_availability_breakpoint: Hash256;
|
||||
|
||||
if let Some(breakpoint) = blob_info.data_availability_breakpoint {
|
||||
if breakpoint == blob_info.oldest_blob_parent {
|
||||
match blob_info.data_availability_breakpoint {
|
||||
Some(breakpoint) => {
|
||||
if breakpoint == blob_info.oldest_blob_parent {
|
||||
return Ok(());
|
||||
}
|
||||
data_availability_breakpoint = breakpoint;
|
||||
}
|
||||
None => {
|
||||
return Ok(());
|
||||
}
|
||||
data_availability_breakpoint = breakpoint;
|
||||
} else {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// Load the state from which to prune blobs so we can backtrack.
|
||||
|
Loading…
Reference in New Issue
Block a user