From 85bc9737a5d8fa81e32bca07a0863d61a0cd560e Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Fri, 13 Sep 2024 16:56:02 +1000 Subject: [PATCH] fix: Correct typo in error variable name in Unmarshal function --- pkg/proto/xatu/filter_test.go | 4 ++-- pkg/relaymonitor/ethereum/ethereum.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/proto/xatu/filter_test.go b/pkg/proto/xatu/filter_test.go index 254a7c24..645926fa 100644 --- a/pkg/proto/xatu/filter_test.go +++ b/pkg/proto/xatu/filter_test.go @@ -189,7 +189,7 @@ func TestEventFilter_FilterByEventNamesAndModules(t *testing.T) { assert.False(t, shouldBeDropped) // Test with a different source - testEvent.Meta.Client.ModuleName = xatu.ModuleName_MIMICRY + testEvent.Meta.Client.ModuleName = xatu.ModuleName_EL_MIMICRY shouldBeDropped, err = filter.ShouldBeDropped(testEvent) if err != nil { @@ -199,7 +199,7 @@ func TestEventFilter_FilterByEventNamesAndModules(t *testing.T) { assert.True(t, shouldBeDropped) // Test with a different event name - testEvent.Meta.Client.ModuleName = xatu.ModuleName_MIMICRY + testEvent.Meta.Client.ModuleName = xatu.ModuleName_EL_MIMICRY testEvent.Event.Name = xatu.Event_BEACON_API_ETH_V1_EVENTS_HEAD diff --git a/pkg/relaymonitor/ethereum/ethereum.go b/pkg/relaymonitor/ethereum/ethereum.go index f7abcde6..bc2ad78a 100644 --- a/pkg/relaymonitor/ethereum/ethereum.go +++ b/pkg/relaymonitor/ethereum/ethereum.go @@ -130,12 +130,13 @@ func (b *BeaconNetwork) fetchGenesisTime(ctx context.Context) (uint64, error) { var data struct { Data struct { + //nolint:tagliatelle // At the mercy of the config spec. GenesisTime string `json:"genesis_time"` } `json:"data"` } - if err := json.Unmarshal(body, &data); err != nil { - return 0, fmt.Errorf("failed to unmarshal response body: %w", err) + if errr := json.Unmarshal(body, &data); errr != nil { + return 0, fmt.Errorf("failed to unmarshal response body: %w", errr) } if data.Data.GenesisTime == "" {