Skip to content

Commit

Permalink
fix: fix blob sidecar index check (#7315)
Browse files Browse the repository at this point in the history
Fix index check
  • Loading branch information
ensi321 authored Dec 19, 2024
1 parent bfe54d2 commit 1f38c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/chain/validation/blobSidecar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function validateGossipBlobSidecar(
const blobSlot = blobSidecar.signedBlockHeader.message.slot;

// [REJECT] The sidecar's index is consistent with `MAX_BLOBS_PER_BLOCK` -- i.e. `blob_sidecar.index < MAX_BLOBS_PER_BLOCK`.
if (blobSidecar.index < chain.config.MAX_BLOBS_PER_BLOCK) {
if (blobSidecar.index >= chain.config.MAX_BLOBS_PER_BLOCK) {
throw new BlobSidecarGossipError(GossipAction.REJECT, {
code: BlobSidecarErrorCode.INDEX_TOO_LARGE,
blobIdx: blobSidecar.index,
Expand Down

0 comments on commit 1f38c8b

Please sign in to comment.