From b54d49a318998766a1ffe97fa6c75fef9973a9e6 Mon Sep 17 00:00:00 2001 From: Isma <71719097+Doozers@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:24:35 +0100 Subject: [PATCH] fix: update dep versions for goerli fork Signed-off-by: Isma <71719097+Doozers@users.noreply.github.com> --- plugins/pgeth-monitoring/dependencies.sh | 2 +- plugins/pgeth-monitoring/pgeth_monitoring.go | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/pgeth-monitoring/dependencies.sh b/plugins/pgeth-monitoring/dependencies.sh index 78b2f96ac4..18300a3d35 100755 --- a/plugins/pgeth-monitoring/dependencies.sh +++ b/plugins/pgeth-monitoring/dependencies.sh @@ -3,5 +3,5 @@ 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/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 diff --git a/plugins/pgeth-monitoring/pgeth_monitoring.go b/plugins/pgeth-monitoring/pgeth_monitoring.go index 16b1ca0b96..922149f64c 100644 --- a/plugins/pgeth-monitoring/pgeth_monitoring.go +++ b/plugins/pgeth-monitoring/pgeth_monitoring.go @@ -9,9 +9,10 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" - "github.com/redis/go-redis/v9" - - "github.com/attestantio/go-eth2-client/http" + "github.com/attestantio/go-eth2-client/api" + "github.com/redis/go-redis/v9" + + "github.com/attestantio/go-eth2-client/http" "github.com/rs/zerolog" "github.com/ethereum/go-ethereum/common" @@ -340,15 +341,15 @@ func (me *MonitoringEngine) startHeadListener(ctx context.Context) { 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 { me.errChan <- err continue } - newHighestFinalized := res.Capella.Message.Body.ExecutionPayload.BlockNumber + newHighestFinalized := res.Data.Capella.Message.Body.ExecutionPayload.BlockNumber 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) } else if newHighestFinalized > highestFinalized { me.ptk.Logger.Info("Updating finalized head", "from", highestFinalized, "to", newHighestFinalized)