From 8ffaa7d4e4b7f5da650156acaae5e004f5698da1 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 26 Jun 2024 20:38:01 +0300 Subject: [PATCH] Fix for linter. --- go/host/enclave/guardian.go | 50 ------------------------------------- 1 file changed, 50 deletions(-) diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 8ff5ead9ff..105a34baa2 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -123,7 +123,6 @@ func (g *Guardian) Start() error { // Note: after HA work this will need additional check that we are the **active** sequencer enclave go g.periodicBatchProduction() go g.periodicRollupProduction() - //go g.periodicBundleSubmission() } // subscribe for L1 and P2P data @@ -626,55 +625,6 @@ func (g *Guardian) periodicRollupProduction() { } } -func (g *Guardian) periodicBundleSubmission() { - defer g.logger.Info("Stopping bundle submission") - - interval := g.crossChainInterval - g.logger.Info("Starting cross chain bundle submission", "interval", interval) - - bundleSubmissionTicker := time.NewTicker(interval) - - fromSequenceNumber := uint64(0) - - for { - select { - case <-bundleSubmissionTicker.C: - from, to, err := g.sl.L1Publisher().GetBundleRangeFromManagementContract() - if err != nil { - g.logger.Error("Unable to get bundle range from management contract", log.ErrKey, err) - continue - } - - if from.Uint64() > fromSequenceNumber { - fromSequenceNumber = from.Uint64() - } - - bundle, err := g.enclaveClient.ExportCrossChainData(context.Background(), fromSequenceNumber, to.Uint64()) - if err != nil { - if !errors.Is(err, errutil.ErrCrossChainBundleNoBatches) { - g.logger.Error("Unable to export cross chain bundle from enclave", log.ErrKey, err) - } - continue - } - - if len(bundle.CrossChainRootHashes) == 0 { - g.logger.Debug("No cross chain data to submit") - fromSequenceNumber = to.Uint64() + 1 - continue - } - - err = g.sl.L1Publisher().PublishCrossChainBundle(bundle) - if err != nil { - g.logger.Error("Unable to publish cross chain bundle", log.ErrKey, err) - continue - } - case <-g.hostInterrupter.Done(): - bundleSubmissionTicker.Stop() - return - } - } -} - func (g *Guardian) streamEnclaveData() { defer g.logger.Info("Stopping enclave data stream") g.logger.Info("Starting L2 update stream from enclave")