Rename payloadattribute Timestamps to Timestamp (#13523)

Co-authored-by: terence <terence@prysmaticlabs.com>
This commit is contained in:
Justin Traglia 2024-03-21 16:11:01 -05:00 committed by GitHub
parent 32fb183392
commit a6e86c6731
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ func (a *data) PrevRandao() []byte {
return a.prevRandao return a.prevRandao
} }
// Timestamps returns the timestamp of the payload attribute. // Timestamp returns the timestamp of the payload attribute.
func (a *data) Timestamps() uint64 { func (a *data) Timestamp() uint64 {
return a.timeStamp return a.timeStamp
} }
@ -100,7 +100,7 @@ func (a *data) IsEmpty() bool {
if len(a.PrevRandao()) != 0 { if len(a.PrevRandao()) != 0 {
return false return false
} }
if a.Timestamps() != 0 { if a.Timestamp() != 0 {
return false return false
} }
if len(a.SuggestedFeeRecipient()) != 0 { if len(a.SuggestedFeeRecipient()) != 0 {

View File

@ -44,7 +44,7 @@ func TestPayloadAttributeGetters(t *testing.T) {
r := uint64(123) r := uint64(123)
a, err := New(&enginev1.PayloadAttributes{Timestamp: r}) a, err := New(&enginev1.PayloadAttributes{Timestamp: r})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, r, a.Timestamps()) require.Equal(t, r, a.Timestamp())
}, },
}, },
{ {

View File

@ -7,7 +7,7 @@ import (
type Attributer interface { type Attributer interface {
Version() int Version() int
PrevRandao() []byte PrevRandao() []byte
Timestamps() uint64 Timestamp() uint64
SuggestedFeeRecipient() []byte SuggestedFeeRecipient() []byte
Withdrawals() ([]*enginev1.Withdrawal, error) Withdrawals() ([]*enginev1.Withdrawal, error)
PbV1() (*enginev1.PayloadAttributes, error) PbV1() (*enginev1.PayloadAttributes, error)