Skip to content

Commit

Permalink
fix execution block hash
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Oct 3, 2023
1 parent c934f6e commit 649530a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/versionedblockrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ func (v *VersionedBlockRequest) ExecutionBlockHash() (phase0.Hash32, error) {
if v.Capella == nil || v.Capella.Message == nil || v.Capella.Message.Body == nil || v.Capella.Message.Body.ExecutionPayload == nil {
return phase0.Hash32{}, errors.New("no capella block")
}
return v.Bellatrix.Message.Body.ExecutionPayload.BlockHash, nil
return v.Capella.Message.Body.ExecutionPayload.BlockHash, nil
case spec.DataVersionDeneb:
if v.Deneb == nil || v.Deneb.SignedBlock == nil || v.Deneb.SignedBlock.Message == nil || v.Deneb.SignedBlock.Message.Body == nil || v.Deneb.SignedBlock.Message.Body.ExecutionPayload == nil {
return phase0.Hash32{}, errors.New("no denb block")
}
return v.Bellatrix.Message.Body.ExecutionPayload.BlockHash, nil
return v.Deneb.SignedBlock.Message.Body.ExecutionPayload.BlockHash, nil
default:
return phase0.Hash32{}, errors.New("unknown version")
}
Expand Down

0 comments on commit 649530a

Please sign in to comment.