Skip to content

Commit

Permalink
Fixes for in mem.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed May 20, 2024
1 parent 99de392 commit c6c7a96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion go/host/enclave/guardian.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions go/host/l1/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit c6c7a96

Please sign in to comment.