Commit cc4af3b8 authored by protolambda's avatar protolambda

op-e2e: get rid of unused temp batcher db file

parent 74357a8d
...@@ -3,9 +3,7 @@ package op_e2e ...@@ -3,9 +3,7 @@ package op_e2e
import ( import (
"context" "context"
"fmt" "fmt"
"io/ioutil"
"math/big" "math/big"
"os"
"strings" "strings"
"time" "time"
...@@ -107,17 +105,16 @@ type System struct { ...@@ -107,17 +105,16 @@ type System struct {
wallet *hdwallet.Wallet wallet *hdwallet.Wallet
// Connections to running nodes // Connections to running nodes
nodes map[string]*node.Node nodes map[string]*node.Node
backends map[string]*eth.Ethereum backends map[string]*eth.Ethereum
Clients map[string]*ethclient.Client Clients map[string]*ethclient.Client
RolupGenesis rollup.Genesis RolupGenesis rollup.Genesis
rollupNodes map[string]*rollupNode.OpNode rollupNodes map[string]*rollupNode.OpNode
l2OutputSubmitter *l2os.L2OutputSubmitter l2OutputSubmitter *l2os.L2OutputSubmitter
sequencerHistoryDBFileName string batchSubmitter *bss.BatchSubmitter
batchSubmitter *bss.BatchSubmitter L2OOContractAddr common.Address
L2OOContractAddr common.Address DepositContractAddr common.Address
DepositContractAddr common.Address Mocknet mocknet.Mocknet
Mocknet mocknet.Mocknet
} }
func precompileAlloc() core.GenesisAlloc { func precompileAlloc() core.GenesisAlloc {
...@@ -153,9 +150,6 @@ func (sys *System) Close() { ...@@ -153,9 +150,6 @@ func (sys *System) Close() {
if sys.batchSubmitter != nil { if sys.batchSubmitter != nil {
sys.batchSubmitter.Stop() sys.batchSubmitter.Stop()
} }
if sys.sequencerHistoryDBFileName != "" {
_ = os.Remove(sys.sequencerHistoryDBFileName)
}
for _, node := range sys.rollupNodes { for _, node := range sys.rollupNodes {
node.Close() node.Close()
...@@ -570,15 +564,6 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -570,15 +564,6 @@ func (cfg SystemConfig) start() (*System, error) {
return nil, fmt.Errorf("unable to start l2 output submitter: %w", err) return nil, fmt.Errorf("unable to start l2 output submitter: %w", err)
} }
sequencerHistoryDBFile, err := ioutil.TempFile("", "bss.*.json")
if err != nil {
return nil, fmt.Errorf("unable to create sequencer history db file: %w", err)
}
sys.sequencerHistoryDBFileName = sequencerHistoryDBFile.Name()
if err = sequencerHistoryDBFile.Close(); err != nil {
return nil, fmt.Errorf("unable to close sequencer history db file: %w", err)
}
// Batch Submitter // Batch Submitter
sys.batchSubmitter, err = bss.NewBatchSubmitter(bss.Config{ sys.batchSubmitter, err = bss.NewBatchSubmitter(bss.Config{
L1EthRpc: sys.nodes["l1"].WSEndpoint(), L1EthRpc: sys.nodes["l1"].WSEndpoint(),
...@@ -594,7 +579,6 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -594,7 +579,6 @@ func (cfg SystemConfig) start() (*System, error) {
LogTerminal: true, // ignored LogTerminal: true, // ignored
Mnemonic: sys.cfg.Mnemonic, Mnemonic: sys.cfg.Mnemonic,
SequencerHDPath: sys.cfg.BatchSubmitterHDPath, SequencerHDPath: sys.cfg.BatchSubmitterHDPath,
SequencerHistoryDBFilename: sys.sequencerHistoryDBFileName,
SequencerBatchInboxAddress: sys.cfg.RollupConfig.BatchInboxAddress.String(), SequencerBatchInboxAddress: sys.cfg.RollupConfig.BatchInboxAddress.String(),
}, sys.cfg.Loggers["batcher"]) }, sys.cfg.Loggers["batcher"])
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment