Skip to content

Commit 52fcebd

Browse files
authored
Merge of #5426
2 parents d3c6f20 + 5621f68 commit 52fcebd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

beacon_node/beacon_chain/src/data_availability_checker/availability_view.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,10 @@ pub trait AvailabilityView<E: EthSpec> {
108108
/// 1. The blob entry at the index is empty and no block exists, or
109109
/// 2. The block exists and its commitment matches the blob's commitment.
110110
fn merge_single_blob(&mut self, index: usize, blob: Self::BlobType) {
111-
let commitment = *blob.get_commitment();
112111
if let Some(cached_block) = self.get_cached_block() {
113112
let block_commitment_opt = cached_block.get_commitments().get(index).copied();
114113
if let Some(block_commitment) = block_commitment_opt {
115-
if block_commitment == commitment {
114+
if block_commitment == *blob.get_commitment() {
116115
self.insert_blob_at_index(index, blob)
117116
}
118117
}

beacon_node/http_api/src/publish_blocks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlockConten
8282
| SignedBeaconBlock::Altair(_)
8383
| SignedBeaconBlock::Merge(_)
8484
| SignedBeaconBlock::Capella(_) => {
85-
crate::publish_pubsub_message(&sender, PubsubMessage::BeaconBlock(block.clone()))
85+
crate::publish_pubsub_message(&sender, PubsubMessage::BeaconBlock(block))
8686
.map_err(|_| BlockError::BeaconChainError(BeaconChainError::UnableToPublish))?;
8787
}
8888
SignedBeaconBlock::Deneb(_) => {
89-
let mut pubsub_messages = vec![PubsubMessage::BeaconBlock(block.clone())];
89+
let mut pubsub_messages = vec![PubsubMessage::BeaconBlock(block)];
9090
if let Some(blob_sidecars) = blobs_opt {
9191
for (blob_index, blob) in blob_sidecars.into_iter().enumerate() {
9292
pubsub_messages.push(PubsubMessage::BlobSidecar(Box::new((

0 commit comments

Comments
 (0)