simulation

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BNB_DENOM   = "htltbnb"
	OTHER_DENOM = "htltinc"
)
View Source
const (
	OpWeightMsgCreateHTLC = "op_weight_msg_create_htlc"
	OpWeightMsgClaimHTLC  = "op_weight_msg_claim_htlc"
)

Simulation operation weights constants

Variables

View Source
var (
	MinTimeLock = uint64(50)
	MaxTimeLock = uint64(34560)
	Deputy      = sdk.AccAddress(crypto.AddressHash([]byte("Deputy")))
)

Functions

func GenHashLock added in v1.5.0

func GenHashLock(secret tmbytes.HexBytes, timestamp uint64) []byte

func GenRandomHtlc added in v1.5.0

func GenRandomHtlc(ctx sdk.Context, k keeper.Keeper, r *rand.Rand) types.HTLC

func GenTimestamp added in v1.5.0

func GenTimestamp(r *rand.Rand, ctx sdk.Context) int

func Gensecret added in v1.5.0

func Gensecret() []byte

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

NewDecodeStore unmarshals the KVPair's Value to the corresponding HTLC type

func RandomizedGenState added in v1.5.0

func RandomizedGenState(simState *module.SimulationState)

func SimulateMsgClaimHtlc added in v1.5.0

func SimulateMsgClaimHtlc(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper) simtypes.Operation

func SimulateMsgCreateHtlc added in v1.5.0

func SimulateMsgCreateHtlc(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper) simtypes.Operation

func WeightedOperations added in v1.5.0

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL