Skip to content

Commit

Permalink
don't recalculate number of kzgCommitments
Browse files Browse the repository at this point in the history
  • Loading branch information
shotes committed Dec 18, 2024
1 parent 0b44fab commit f040e37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions beacon/blockchain/process_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ func (s *Service[
}

// Make sure we have the right number of BlobSidecars
kzgCommitments := blk.GetBody().GetBlobKzgCommitments()
if len(kzgCommitments) != sidecars.Len() {
numCommitments := len(blk.GetBody().GetBlobKzgCommitments())
if numCommitments != sidecars.Len() {
err = fmt.Errorf("expected %d sidecars, got %d",
len(kzgCommitments), sidecars.Len(),
numCommitments, sidecars.Len(),
)
return createProcessProposalResponse(errors.WrapNonFatal(err))
}

if len(kzgCommitments) > 0 {
if numCommitments > 0 {
// Process the blob sidecars
//
// In theory, swapping the order of verification between the sidecars
Expand Down

0 comments on commit f040e37

Please sign in to comment.