Skip to content

Commit

Permalink
Merge pull request #611 from OffchainLabs/fix-node
Browse files Browse the repository at this point in the history
Only create da signer when running with a wallet
  • Loading branch information
edfelten authored May 13, 2022
2 parents 06bb7e7 + 18b8d33 commit f88b6fa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f88b6fa

Please sign in to comment.