diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 23a072cb2d..e1f169af1c 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -628,7 +628,13 @@ func (g *Guardian) periodicBundleSubmission() { defer g.logger.Info("Stopping bundle submission") // check rollup every l1 block time - bundleSubmissionTicker := time.NewTicker(g.rollupInterval) + + interval := g.rollupInterval + if interval == 0 { + interval = g.blockTime + } + + bundleSubmissionTicker := time.NewTicker(interval) for { select { diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 5ec7cd933c..9d94e833b9 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -100,6 +100,10 @@ func (p *Publisher) Start() error { } func (p *Publisher) GetBundleRangeFromManagementContract() (*big.Int, *big.Int, error) { + if p.mgmtContractLib.IsMock() { + return nil, nil, fmt.Errorf("bundle publishing unavailable for mocked environments") + } + managementCtr, err := ManagementContract.NewManagementContract(*p.mgmtContractLib.GetContractAddr(), p.ethClient.EthClient()) if err != nil { p.logger.Error("Unable to instantiate management contract client")