From aa6696ae33c7b3e0b5d4a5095380dd5632736db8 Mon Sep 17 00:00:00 2001 From: Harry Kalodner Date: Fri, 13 May 2022 18:14:00 -0400 Subject: [PATCH] Only create da signer when running with a wallet --- cmd/nitro/nitro.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/nitro/nitro.go b/cmd/nitro/nitro.go index 567125a43f..5a8aae6ff3 100644 --- a/cmd/nitro/nitro.go +++ b/cmd/nitro/nitro.go @@ -113,6 +113,7 @@ func main() { var rollupAddrs arbnode.RollupAddresses var l1TransactionOpts *bind.TransactOpts + var daSigner func([]byte) ([]byte, error) if nodeConfig.Node.L1Reader.Enable { log.Info("connected to l1 chain", "l1url", nodeConfig.L1.URL, "l1chainid", l1ChainId) @@ -129,6 +130,11 @@ func main() { if err != nil { panic(err) } + + daSigner, err = arbnode.GetSignerFromWallet(l1Wallet) + if err != nil { + panic(err) + } } } else if l1Client != nil { // Don't need l1Client anymore @@ -296,11 +302,6 @@ func main() { } } - daSigner, err := arbnode.GetSignerFromWallet(l1Wallet) - if err != nil { - panic(err) - } - currentNode, err := arbnode.CreateNode(stack, chainDb, &nodeConfig.Node, l2BlockChain, l1Client, &rollupAddrs, l1TransactionOpts, daSigner) if err != nil { panic(err)