Skip to content

Commit

Permalink
make sure flag is always set
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Sep 15, 2023
1 parent 097157f commit 6c285c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions go/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,8 @@ func (h *host) validateConfig() {
if h.config.P2PPublicAddress == "" {
h.logger.Crit("the host must specify a public P2P address")
}

if h.config.L1BlockTime == 0 {
h.logger.Crit("the host must specify an L1 block time")
}
}
6 changes: 5 additions & 1 deletion integration/simulation/devnetwork/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type ObscuroConfig struct {
InitNumValidators int
BatchInterval time.Duration
RollupInterval time.Duration
L1BlockTime time.Duration
}

// DefaultDevNetwork provides an off-the-shelf default config for a sim network
Expand All @@ -50,6 +51,7 @@ func DefaultDevNetwork() *InMemDevNetwork {
InitNumValidators: 3,
BatchInterval: 1 * time.Second,
RollupInterval: 10 * time.Second,
L1BlockTime: 15 * time.Second,
},
faucetLock: sync.Mutex{},
}
Expand Down Expand Up @@ -86,7 +88,9 @@ func LiveL1DevNetwork(seqWallet wallet.Wallet, validatorWallets []wallet.Wallet,
PortStart: integration.StartPortSimulationFullNetwork,
InitNumValidators: len(validatorWallets),
BatchInterval: 5 * time.Second,
RollupInterval: 1 * time.Minute,
RollupInterval: 3 * time.Minute,
L1BlockTime: 15 * time.Second,
SequencerID: seqWallet.Address(),

Check failure on line 93 in integration/simulation/devnetwork/config.go

View workflow job for this annotation

GitHub Actions / build

unknown field SequencerID in struct literal of type ObscuroConfig

Check failure on line 93 in integration/simulation/devnetwork/config.go

View workflow job for this annotation

GitHub Actions / lint

unknown field SequencerID in struct literal of type ObscuroConfig

Check failure on line 93 in integration/simulation/devnetwork/config.go

View workflow job for this annotation

GitHub Actions / lint

unknown field SequencerID in struct literal of type ObscuroConfig
},
}
}
3 changes: 1 addition & 2 deletions integration/simulation/devnetwork/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"math/big"
"os"

"github.com/obscuronet/go-obscuro/go/host/l1"

"github.com/obscuronet/go-obscuro/go/host"

"github.com/obscuronet/go-obscuro/go/enclave/storage/init/sqlite"
Expand Down Expand Up @@ -130,6 +128,7 @@ func (n *InMemNodeOperator) createHostContainer() *hostcontainer.HostContainer {
DebugNamespaceEnabled: true,
BatchInterval: n.config.BatchInterval,
RollupInterval: n.config.RollupInterval,
L1BlockTime: n.config.L1BlockTime,
}

hostLogger := testlog.Logger().New(log.NodeIDKey, n.operatorIdx, log.CmpKey, log.HostCmp)
Expand Down

0 comments on commit 6c285c4

Please sign in to comment.