Skip to content

Commit

Permalink
remove storageMap from eventhandler
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusKysel committed Aug 13, 2024
1 parent b5dd15c commit 87845f1
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 15 deletions.
3 changes: 0 additions & 3 deletions cli/operator/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ var StartNodeCmd = &cobra.Command{
logger,
executionClient,
validatorCtrl,
storageMap,
metricsReporter,
networkConfig,
nodeStorage,
Expand Down Expand Up @@ -644,7 +643,6 @@ func setupEventHandling(
logger *zap.Logger,
executionClient *executionclient.ExecutionClient,
validatorCtrl validator.Controller,
storageMap *ibftstorage.QBFTStores,
metricsReporter metricsreporter.MetricsReporter,
networkConfig networkconfig.NetworkConfig,
nodeStorage operatorstorage.Storage,
Expand All @@ -668,7 +666,6 @@ func setupEventHandling(
operatorDecrypter,
keyManager,
cfg.SSVOptions.ValidatorOptions.Beacon,
storageMap,
eventhandler.WithFullNode(),
eventhandler.WithLogger(logger),
eventhandler.WithMetrics(metricsReporter),
Expand Down
2 changes: 0 additions & 2 deletions eth/ethtest/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ func setupEventHandler(
operator.privateKey,
keyManager,
bc,
storageMap,
eventhandler.WithFullNode(),
eventhandler.WithLogger(logger),
)
Expand Down Expand Up @@ -222,7 +221,6 @@ func setupEventHandler(
operator.privateKey,
keyManager,
bc,
storageMap,
eventhandler.WithFullNode(),
eventhandler.WithLogger(logger),
)
Expand Down
7 changes: 2 additions & 5 deletions eth/eventhandler/event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package eventhandler
import (
"errors"
"fmt"
"github.com/ssvlabs/ssv/ekm"
"math/big"
"time"

"github.com/ssvlabs/ssv/ekm"

"github.com/attestantio/go-eth2-client/spec/phase0"
ethcommon "github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
Expand All @@ -19,7 +20,6 @@ import (
"github.com/ssvlabs/ssv/eth/eventparser"
"github.com/ssvlabs/ssv/eth/executionclient"
"github.com/ssvlabs/ssv/eth/localevents"
qbftstorage "github.com/ssvlabs/ssv/ibft/storage"
"github.com/ssvlabs/ssv/logging/fields"
"github.com/ssvlabs/ssv/networkconfig"
operatordatastore "github.com/ssvlabs/ssv/operator/datastore"
Expand Down Expand Up @@ -66,7 +66,6 @@ type EventHandler struct {
operatorDecrypter keys.OperatorDecrypter
keyManager ekm.KeyManager
beacon beaconprotocol.BeaconNode
storageMap *qbftstorage.QBFTStores

fullNode bool
logger *zap.Logger
Expand All @@ -82,7 +81,6 @@ func New(
operatorDecrypter keys.OperatorDecrypter,
keyManager ekm.KeyManager,
beacon beaconprotocol.BeaconNode,
storageMap *qbftstorage.QBFTStores,
opts ...Option,
) (*EventHandler, error) {
eh := &EventHandler{
Expand All @@ -94,7 +92,6 @@ func New(
operatorDecrypter: operatorDecrypter,
keyManager: keyManager,
beacon: beacon,
storageMap: storageMap,
logger: zap.NewNop(),
metrics: nopMetrics{},
}
Expand Down
2 changes: 0 additions & 2 deletions eth/eventhandler/event_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,6 @@ func setupEventHandler(t *testing.T, ctx context.Context, logger *zap.Logger, ne
operator.privateKey,
keyManager,
bc,
storageMap,
WithFullNode(),
WithLogger(logger),
WithMetrics(nopMetrics{}),
Expand Down Expand Up @@ -1363,7 +1362,6 @@ func setupEventHandler(t *testing.T, ctx context.Context, logger *zap.Logger, ne
operator.privateKey,
keyManager,
bc,
storageMap,
WithFullNode(),
WithLogger(logger))
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions eth/eventsyncer/event_syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/ssvlabs/ssv/eth/executionclient"
"github.com/ssvlabs/ssv/eth/simulator"
"github.com/ssvlabs/ssv/eth/simulator/simcontract"
ibftstorage "github.com/ssvlabs/ssv/ibft/storage"
"github.com/ssvlabs/ssv/networkconfig"
operatordatastore "github.com/ssvlabs/ssv/operator/datastore"
"github.com/ssvlabs/ssv/operator/keys"
Expand Down Expand Up @@ -152,7 +151,6 @@ func setupEventHandler(
operatorData *registrystorage.OperatorData,
privateKey keys.OperatorPrivateKey,
) *eventhandler.EventHandler {
storageMap := ibftstorage.NewStores()
operatorDataStore := operatordatastore.New(operatorData)
testNetworkConfig := networkconfig.TestNetwork

Expand Down Expand Up @@ -187,7 +185,6 @@ func setupEventHandler(
privateKey,
keyManager,
bc,
storageMap,
eventhandler.WithFullNode(),
eventhandler.WithLogger(logger))

Expand Down

0 comments on commit 87845f1

Please sign in to comment.