Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Oct 7, 2024
1 parent 6d2711a commit 5c64f28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cl/cltypes/solid/pending_attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package solid

import (
"encoding/json"
"fmt"
"errors"

"github.com/erigontech/erigon-lib/common/length"

Expand Down Expand Up @@ -54,7 +54,7 @@ func (a *PendingAttestation) DecodeSSZ(buf []byte, _ int) error {

func (a *PendingAttestation) EncodeSSZ(dst []byte) ([]byte, error) {
if a.Data == nil {
return nil, fmt.Errorf("attestation data is nil")
return nil, errors.New("attestation data is nil")
}
return ssz2.MarshalSSZ(dst, a.AggregationBits, a.Data, a.InclusionDelay, a.ProposerIndex)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (r *HistoricalStatesReader) getAttestationParticipationFlagIndicies(tx kv.T
}
// Matching roots
if !data.Source.Equal(justifiedCheckpoint) && !skipAssert {
return nil, fmt.Errorf("GetAttestationParticipationFlagIndicies: source does not match.")
return nil, errors.New("GetAttestationParticipationFlagIndicies: source does not match.")
}
i := (data.Target.Epoch * r.cfg.SlotsPerEpoch) % r.cfg.SlotsPerHistoricalRoot
targetRoot, err := r.readHistoricalBlockRoot(tx, stateSlot, i)
Expand Down

0 comments on commit 5c64f28

Please sign in to comment.