Skip to content

Commit 1a5c57b

Browse files
hawkadrianaljo242
andauthored
refactor(simulation): adjust unjail operation weight and clarify skip reason (#25294)
Co-authored-by: Alex | Interchain Labs <[email protected]>
1 parent 81de795 commit 1a5c57b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x/slashing/simulation/operations.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
const (
2323
OpWeightMsgUnjail = "op_weight_msg_unjail"
2424

25-
DefaultWeightMsgUnjail = 100
25+
DefaultWeightMsgUnjail = 5 // Reduced from 100 since validators are rarely jailed in simulations
2626
)
2727

2828
// WeightedOperations returns all the operations from the module with their respective weights
@@ -87,7 +87,8 @@ func SimulateMsgUnjail(
8787
}
8888

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

0 commit comments

Comments
 (0)