Skip to content

Commit

Permalink
chore: remove chan rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Mar 25, 2024
1 parent 8de26d6 commit e5b2373
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 85 deletions.
4 changes: 1 addition & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ func main() {
}
}

chainRPC := node.NewChain(&cfg.ChainRPC)

rpcServer := rpc.NewServer()
sentryService := service.NewMevSentry(&cfg.Service, validators, builders, chainRPC)
sentryService := service.NewMevSentry(&cfg.Service, validators, builders)
if err := rpcServer.RegisterName("mev", sentryService); err != nil {
panic(err)
}
Expand Down
1 change: 0 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type Config struct {
Service service.Config
Validators []node.ValidatorConfig
Builders []node.BuilderConfig
ChainRPC node.ChainRPCConfig

Debug DebugConfig
Log LogConfig
Expand Down
78 changes: 0 additions & 78 deletions node/node.go

This file was deleted.

3 changes: 0 additions & 3 deletions service/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@ type MevSentry struct {

validators map[string]node.Validator // hostname -> validator
builders map[common.Address]node.Builder // address -> builder
chainRPC node.ChainRPC
}

func NewMevSentry(cfg *Config,
validators map[string]node.Validator,
builders map[common.Address]node.Builder,
chain node.ChainRPC,
) *MevSentry {
s := &MevSentry{
timeout: cfg.RPCTimeout,
validators: validators,
builders: builders,
chainRPC: chain,
}

return s
Expand Down

0 comments on commit e5b2373

Please sign in to comment.