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> {
|
) -> Result<Option<BlobsSidecar<T::EthSpec>>, Error> {
|
||||||
match self.store.get_blobs(block_root)? {
|
match self.store.get_blobs(block_root)? {
|
||||||
Some(blobs) => Ok(Some(blobs)),
|
Some(blobs) => Ok(Some(blobs)),
|
||||||
|
<<<<<<< HEAD
|
||||||
None => {
|
None => {
|
||||||
// Check for the corresponding block to understand whether we *should* have blobs.
|
// Check for the corresponding block to understand whether we *should* have blobs.
|
||||||
self.get_blinded_block(block_root)?
|
self.get_blinded_block(block_root)?
|
||||||
.map(|block| {
|
.map(|block| {
|
||||||
// If there are no KZG commitments in the block, we know the sidecar should
|
// If there are no KZG commitments in the block, we know the sidecar should
|
||||||
// be empty.
|
// 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 =
|
let expected_kzg_commitments =
|
||||||
match block.message().body().blob_kzg_commitments() {
|
match block.message().body().blob_kzg_commitments() {
|
||||||
Ok(kzg_commitments) => kzg_commitments,
|
Ok(kzg_commitments) => kzg_commitments,
|
||||||
|
@ -1694,22 +1694,28 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
pub fn try_prune_blobs(&self, force: bool) -> Result<(), Error> {
|
pub fn try_prune_blobs(&self, force: bool) -> Result<(), Error> {
|
||||||
let mut blob_info: BlobInfo;
|
let mut blob_info: BlobInfo;
|
||||||
|
|
||||||
if let Some(old_blob_info) = self.get_blob_info() {
|
match self.get_blob_info() {
|
||||||
|
Some(old_blob_info) => {
|
||||||
blob_info = old_blob_info;
|
blob_info = old_blob_info;
|
||||||
} else {
|
}
|
||||||
|
None => {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let data_availability_breakpoint: Hash256;
|
let data_availability_breakpoint: Hash256;
|
||||||
|
|
||||||
if let Some(breakpoint) = blob_info.data_availability_breakpoint {
|
match blob_info.data_availability_breakpoint {
|
||||||
|
Some(breakpoint) => {
|
||||||
if breakpoint == blob_info.oldest_blob_parent {
|
if breakpoint == blob_info.oldest_blob_parent {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
data_availability_breakpoint = breakpoint;
|
data_availability_breakpoint = breakpoint;
|
||||||
} else {
|
}
|
||||||
|
None => {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Load the state from which to prune blobs so we can backtrack.
|
// Load the state from which to prune blobs so we can backtrack.
|
||||||
let prune_state = self.get_state(&data_availability_breakpoint, None)?.ok_or(
|
let prune_state = self.get_state(&data_availability_breakpoint, None)?.ok_or(
|
||||||
|
Loading…
Reference in New Issue
Block a user