Skip to content

Commit

Permalink
Rename payloadattribute Timestamps to Timestamp (#13523)
Browse files Browse the repository at this point in the history
Co-authored-by: terence <[email protected]>
  • Loading branch information
jtraglia and terencechain authored Mar 21, 2024
1 parent 32fb183 commit a6e86c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions consensus-types/payload-attribute/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion consensus-types/payload-attribute/getters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion consensus-types/payload-attribute/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6e86c6

Please sign in to comment.