-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from lum-network/feature/lum-843
[LUM-843] Disable Beam & Dfract modules
- Loading branch information
Showing
30 changed files
with
461 additions
and
2,580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.