Skip to content

Commit

Permalink
Merge pull request #57 from lum-network/feature/lum-843
Browse files Browse the repository at this point in the history
[LUM-843] Disable Beam & Dfract modules
  • Loading branch information
lebascou authored Oct 20, 2023
2 parents 0f96fc6 + 7f45925 commit 9e2e5f7
Show file tree
Hide file tree
Showing 30 changed files with 461 additions and 2,580 deletions.
19 changes: 0 additions & 19 deletions x/beam/abci.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
package beam

import (
"fmt"
"time"

"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/lum-network/chain/x/beam/keeper"
"github.com/lum-network/chain/x/beam/types"
)

// EndBlocker Called every block, process the beam expiration and auto close
func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) {
// Notify the telemetry module
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker)

// Acquire the list of beams
ids := keeper.GetBeamIDsFromBlockQueue(ctx, int(ctx.BlockHeight()))

// Process beams expirations
for _, value := range ids {
err := keeper.UpdateBeamStatus(ctx, value, types.BeamState_StateCanceled)
if err != nil {
panic(err)
}
keeper.Logger(ctx).Info(fmt.Sprintf("Canceling beam #%s due to crossed auto close thresold", value), "height", ctx.BlockHeight())
}
}
116 changes: 0 additions & 116 deletions x/beam/abci_test.go

This file was deleted.

35 changes: 0 additions & 35 deletions x/beam/client/cli/flags.go

This file was deleted.

Loading

0 comments on commit 9e2e5f7

Please sign in to comment.