MCPcopy Create free account
hub / github.com/Sifchain/sifnode / GetEpochPosition

Function GetEpochPosition

x/margin/keeper/keeper.go:681–687  ·  view source on GitHub ↗

get position of current block in epoch

(ctx sdk.Context, epochLength int64)

Source from the content-addressed store, hash-verified

679
680// get position of current block in epoch
681func GetEpochPosition(ctx sdk.Context, epochLength int64) int64 {
682 if epochLength <= 0 {
683 epochLength = 1
684 }
685 currentHeight := ctx.BlockHeight()
686 return currentHeight % epochLength
687}
688
689func (k Keeper) ForceCloseLong(ctx sdk.Context, mtp *types.MTP, pool *clptypes.Pool, isAdminClose bool, takeFundPayment bool) (sdk.Uint, error) {
690

Callers 3

CloseLongMethod · 0.85
BeginBlockerMethod · 0.85
ForceCloseLongMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected