Documentation ¶
Index ¶
- Constants
- Variables
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func RandomQuarantineAutoResponses(r *rand.Rand, quarantinedAddrs []string) []*quarantine.AutoResponseEntry
- func RandomQuarantinedAddresses(r *rand.Rand, accounts []simtypes.Account) []string
- func RandomQuarantinedFunds(r *rand.Rand, quarantinedAddrs []string) []*quarantine.QuarantinedFunds
- func RandomizedGenState(simState *module.SimulationState, fundsHolder sdk.AccAddress)
- func SimulateMsgAccept(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgDecline(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgOptIn(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgOptOut(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgUpdateAutoResponses(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simtypes.Operation
- func WeightedOperations(simState module.SimulationState, ak quarantine.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( QuarantineOptIn = "quarantine-opt-in" QuarantineAutoResp = "quarantine-auto-resp" QuarantineFunds = "quarantine-funds" )
const ( OpMsgOptIn = "op_weight_quarantine_msg_opt_in" OpMsgOptOut = "op_weight_quarantine_msg_opt_out" OpMsgAccept = "op_weight_quarantine_msg_accept" OpMsgDecline = "op_weight_quarantine_msg_decline" OpMsgUpdateAutoResponses = "op_weight_quarantine_msg_update_auto_responses" )
Simulation operation weights constants.
const ( WeightMsgOptIn = 100 WeightMsgOptOut = 50 WeightMsgAccept = 50 WeightMsgDecline = 20 WeightMsgUpdateAutoResponses = 50 )
Default weights.
Variables ¶
var ( TypeMsgOptIn = sdk.MsgTypeURL(&quarantine.MsgOptIn{}) TypeMsgOptOut = sdk.MsgTypeURL(&quarantine.MsgOptOut{}) TypeMsgAccept = sdk.MsgTypeURL(&quarantine.MsgAccept{}) TypeMsgDecline = sdk.MsgTypeURL(&quarantine.MsgDecline{}) TypeMsgUpdateAutoResponses = sdk.MsgTypeURL(&quarantine.MsgUpdateAutoResponses{}) )
Quarantine message types.
Functions ¶
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding group type.
func RandomQuarantineAutoResponses ¶
func RandomQuarantineAutoResponses(r *rand.Rand, quarantinedAddrs []string) []*quarantine.AutoResponseEntry
RandomQuarantineAutoResponses randomly defines some auto-responses for some of the provided addresses (and maybe others).
func RandomQuarantinedAddresses ¶
RandomQuarantinedAddresses randomly selects accounts from the ones provided to be quarantined.
func RandomQuarantinedFunds ¶
func RandomQuarantinedFunds(r *rand.Rand, quarantinedAddrs []string) []*quarantine.QuarantinedFunds
RandomQuarantinedFunds randomly generates some quarantined funds for some of the provided addresses.
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState, fundsHolder sdk.AccAddress)
RandomizedGenState generates a random GenesisState for the quarantine module.
func SimulateMsgAccept ¶
func SimulateMsgAccept(simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgAccept accepts quarantined funds.
func SimulateMsgDecline ¶
func SimulateMsgDecline(simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgDecline declines quarantined funds.
func SimulateMsgOptIn ¶
func SimulateMsgOptIn(simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper) simtypes.Operation
SimulateMsgOptIn opts an account into quarantine.
func SimulateMsgOptOut ¶
func SimulateMsgOptOut(simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgOptOut opts an account out of quarantine.
func SimulateMsgUpdateAutoResponses ¶
func SimulateMsgUpdateAutoResponses(simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgUpdateAutoResponses updates an accounts auto-responses
func WeightedOperations ¶
func WeightedOperations( simState module.SimulationState, ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights
Types ¶
This section is empty.