From a6e86c6731755a744180d767128804cf13919025 Mon Sep 17 00:00:00 2001 From: Justin Traglia <95511699+jtraglia@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:11:01 -0500 Subject: [PATCH] Rename payloadattribute Timestamps to Timestamp (#13523) Co-authored-by: terence --- consensus-types/payload-attribute/getters.go | 6 +++--- consensus-types/payload-attribute/getters_test.go | 2 +- consensus-types/payload-attribute/interface.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/consensus-types/payload-attribute/getters.go b/consensus-types/payload-attribute/getters.go index 038336a25d02..6da5874cac18 100644 --- a/consensus-types/payload-attribute/getters.go +++ b/consensus-types/payload-attribute/getters.go @@ -16,8 +16,8 @@ func (a *data) PrevRandao() []byte { return a.prevRandao } -// Timestamps returns the timestamp of the payload attribute. -func (a *data) Timestamps() uint64 { +// Timestamp returns the timestamp of the payload attribute. +func (a *data) Timestamp() uint64 { return a.timeStamp } @@ -100,7 +100,7 @@ func (a *data) IsEmpty() bool { if len(a.PrevRandao()) != 0 { return false } - if a.Timestamps() != 0 { + if a.Timestamp() != 0 { return false } if len(a.SuggestedFeeRecipient()) != 0 { diff --git a/consensus-types/payload-attribute/getters_test.go b/consensus-types/payload-attribute/getters_test.go index 789f402f6d93..b07b21b1c303 100644 --- a/consensus-types/payload-attribute/getters_test.go +++ b/consensus-types/payload-attribute/getters_test.go @@ -44,7 +44,7 @@ func TestPayloadAttributeGetters(t *testing.T) { r := uint64(123) a, err := New(&enginev1.PayloadAttributes{Timestamp: r}) require.NoError(t, err) - require.Equal(t, r, a.Timestamps()) + require.Equal(t, r, a.Timestamp()) }, }, { diff --git a/consensus-types/payload-attribute/interface.go b/consensus-types/payload-attribute/interface.go index 5e76eb265ab4..c36e839e2eba 100644 --- a/consensus-types/payload-attribute/interface.go +++ b/consensus-types/payload-attribute/interface.go @@ -7,7 +7,7 @@ import ( type Attributer interface { Version() int PrevRandao() []byte - Timestamps() uint64 + Timestamp() uint64 SuggestedFeeRecipient() []byte Withdrawals() ([]*enginev1.Withdrawal, error) PbV1() (*enginev1.PayloadAttributes, error)