From 71c7ca2a75d29adac03d55387e4b9f9368303fcc Mon Sep 17 00:00:00 2001 From: Daniil Ankushin Date: Tue, 10 Sep 2024 12:37:58 +0300 Subject: [PATCH] Remove unused code in node.newL1Client() (#2128) --- node/node.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/node/node.go b/node/node.go index 2b1fa2d5c3..1f211cd808 100644 --- a/node/node.go +++ b/node/node.go @@ -290,9 +290,6 @@ func newL1Client(cfg *Config, chain *blockchain.Blockchain, log utils.SimpleLogg } network := chain.Network() - if err != nil { - return nil, fmt.Errorf("find core contract address for network %s: %w", network.String(), err) - } var ethSubscriber *l1.EthSubscriber ethSubscriber, err = l1.NewEthSubscriber(cfg.EthNode, network.CoreContractAddress) @@ -300,10 +297,7 @@ func newL1Client(cfg *Config, chain *blockchain.Blockchain, log utils.SimpleLogg return nil, fmt.Errorf("set up ethSubscriber: %w", err) } - l1Client, err := l1.NewClient(ethSubscriber, chain, log), nil - if err != nil { - return nil, fmt.Errorf("set up l1 client: %w", err) - } + l1Client := l1.NewClient(ethSubscriber, chain, log) if cfg.Metrics { l1Client.WithEventListener(makeL1Metrics())