simulation

package
v0.0.0-...-ff73d50 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.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

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

func GenRandomHtlc

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

func GenTimestamp

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

func Gensecret

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

func RandomizedGenState(simState *module.SimulationState)

func WeightedOperations

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