fix: update dep versions for goerli fork

Signed-off-by: Isma <71719097+Doozers@users.noreply.github.com>
This commit is contained in:
Isma 2024-01-17 17:24:35 +01:00 committed by mortimr
parent 6a47595815
commit b54d49a318
2 changed files with 8 additions and 7 deletions

View file

@ -3,5 +3,5 @@
go get github.com/ethereum/go-ethereum/plugins/pgeth-monitoring go get github.com/ethereum/go-ethereum/plugins/pgeth-monitoring
go get github.com/redis/go-redis/v9@v9.0.3 go get github.com/redis/go-redis/v9@v9.0.3
go get github.com/prometheus/client_golang@v1.12.0 go get github.com/prometheus/client_golang@v1.12.0
go get github.com/attestantio/go-eth2-client/http@v0.16.0 go get github.com/attestantio/go-eth2-client/http@v0.19.9
go mod tidy go mod tidy

View file

@ -9,9 +9,10 @@ import (
"time" "time"
eth2client "github.com/attestantio/go-eth2-client" eth2client "github.com/attestantio/go-eth2-client"
"github.com/redis/go-redis/v9" "github.com/attestantio/go-eth2-client/api"
"github.com/redis/go-redis/v9"
"github.com/attestantio/go-eth2-client/http" "github.com/attestantio/go-eth2-client/http"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
@ -340,15 +341,15 @@ func (me *MonitoringEngine) startHeadListener(ctx context.Context) {
me.eth2 = client me.eth2 = client
} }
res, err := me.eth2.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, "finalized") res, err := me.eth2.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, &api.SignedBeaconBlockOpts{Block: "finalized"})
if err != nil { if err != nil {
me.errChan <- err me.errChan <- err
continue continue
} }
newHighestFinalized := res.Capella.Message.Body.ExecutionPayload.BlockNumber newHighestFinalized := res.Data.Capella.Message.Body.ExecutionPayload.BlockNumber
if highestFinalized == 0 { if highestFinalized == 0 {
highestFinalized = res.Capella.Message.Body.ExecutionPayload.BlockNumber highestFinalized = res.Data.Capella.Message.Body.ExecutionPayload.BlockNumber
me.ptk.Logger.Info("Finalized head was updated", "number", highestFinalized) me.ptk.Logger.Info("Finalized head was updated", "number", highestFinalized)
} else if newHighestFinalized > highestFinalized { } else if newHighestFinalized > highestFinalized {
me.ptk.Logger.Info("Updating finalized head", "from", highestFinalized, "to", newHighestFinalized) me.ptk.Logger.Info("Updating finalized head", "from", highestFinalized, "to", newHighestFinalized)