Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
domiwei committed Jun 18, 2024
1 parent 19cf10c commit 189309f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cl/beacon/handler/block_production.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,15 +812,11 @@ func (a *ApiHandler) publishBlindedBlocks(w http.ResponseWriter, r *http.Request
if len(blobsBundle.Commitments) != blockCommitments.Len() {
return nil, beaconhttp.NewEndpointError(http.StatusBadRequest, fmt.Errorf("commitments length mismatch"))
}
for i, commitment := range blobsBundle.Commitments {
blockCommitment := blockCommitments.Get(i)
blockCommitmentBytes, err := blockCommitment.HashSSZ()
if err != nil {
return nil, beaconhttp.NewEndpointError(http.StatusInternalServerError, err)
}
if !bytes.Equal(commitment, blockCommitmentBytes[:]) {
for i := range blobsBundle.Commitments {
//blockCommitment := blockCommitments.Get(i)
/*if !bytes.Equal(commitment, blockCommitment[:]) {
return nil, beaconhttp.NewEndpointError(http.StatusBadRequest, fmt.Errorf("commitment mismatch: %d", i))
}
}*/
// add the bundle to recently produced blobs
a.blobBundles.Add(libcommon.Bytes48(blobsBundle.Commitments[i]), BlobBundle{
Blob: (*cltypes.Blob)(blobsBundle.Blobs[i]),
Expand Down

0 comments on commit 189309f

Please sign in to comment.