Skip to content

Commit

Permalink
todos
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Apr 18, 2024
1 parent 02e6b21 commit 6a0e4e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consensus-types/blocks/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ func BuildSignedBeaconBlockFromExecutionPayload(
var fullBlock interface{}
switch p := payload.(type) {
case *enginev1.ExecutionPayload:
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.Body().Attestations()))
for i, att := range b.Body().Attestations() {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -305,6 +306,7 @@ func BuildSignedBeaconBlockFromExecutionPayload(
if err != nil {
return nil, err
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.Body().Attestations()))
for i, att := range b.Body().Attestations() {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -343,6 +345,7 @@ func BuildSignedBeaconBlockFromExecutionPayload(
if err != nil {
return nil, err
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.Body().Attestations()))
for i, att := range b.Body().Attestations() {
a, ok := att.(*eth.Attestation)
Expand Down
3 changes: 3 additions & 0 deletions consensus-types/blocks/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func (b *SignedBeaconBlock) ToBlinded() (interfaces.ReadOnlySignedBeaconBlock, e
if err != nil {
return nil, err
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.block.body.attestations))
for i, att := range b.block.body.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -285,6 +286,7 @@ func (b *SignedBeaconBlock) ToBlinded() (interfaces.ReadOnlySignedBeaconBlock, e
if err != nil {
return nil, err
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.block.body.attestations))
for i, att := range b.block.body.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -320,6 +322,7 @@ func (b *SignedBeaconBlock) ToBlinded() (interfaces.ReadOnlySignedBeaconBlock, e
if err != nil {
return nil, err
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.block.body.attestations))
for i, att := range b.block.body.attestations {
a, ok := att.(*eth.Attestation)
Expand Down
8 changes: 8 additions & 0 deletions consensus-types/blocks/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {

switch b.version {
case version.Phase0:
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand All @@ -311,6 +312,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
VoluntaryExits: b.voluntaryExits,
}, nil
case version.Altair:
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -339,6 +341,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadHeaderWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -367,6 +370,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -396,6 +400,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadHeaderWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -425,6 +430,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -455,6 +461,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadHeaderWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down Expand Up @@ -485,6 +492,7 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) {
return nil, errPayloadWrongType
}
}
// TODO: extend to Electra
atts := make([]*eth.Attestation, len(b.attestations))
for i, att := range b.attestations {
a, ok := att.(*eth.Attestation)
Expand Down

0 comments on commit 6a0e4e1

Please sign in to comment.