Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions x/slashing/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
const (
OpWeightMsgUnjail = "op_weight_msg_unjail"

DefaultWeightMsgUnjail = 100
DefaultWeightMsgUnjail = 5 // Reduced from 100 since validators are rarely jailed in simulations
)

// WeightedOperations returns all the operations from the module with their respective weights
Expand Down Expand Up @@ -87,7 +87,8 @@ func SimulateMsgUnjail(
}

if !validator.IsJailed() {
// TODO: due to this condition this message is almost, if not always, skipped !
// This operation is often skipped because validators are rarely jailed in simulations.
// The weight has been reduced to 5 to reflect this reality.
return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is not jailed"), nil, nil
}

Expand Down
Loading