Merge PR #3546: Min Self Delegation

This commit is contained in:
Sunny Aggarwal
2019-02-08 12:44:19 -08:00
committed by Jack Zampolin
parent ba63eb1801
commit cff985ffc5
31 changed files with 337 additions and 125 deletions
+2 -7
View File
@@ -44,7 +44,7 @@ func SimulateMsgCreateValidator(m auth.AccountKeeper, k staking.Keeper) simulati
selfDelegation := sdk.NewCoin(denom, amount)
msg := staking.NewMsgCreateValidator(address, acc.PubKey,
selfDelegation, description, commission)
selfDelegation, description, commission, sdk.OneInt())
if msg.ValidateBasic() != nil {
return "", nil, fmt.Errorf("expected msg to pass ValidateBasic: %s", msg.GetSignBytes())
@@ -82,16 +82,11 @@ func SimulateMsgEditValidator(k staking.Keeper) simulation.Operation {
address := val.GetOperator()
newCommissionRate := simulation.RandomDecAmount(r, val.Commission.MaxRate)
msg := staking.MsgEditValidator{
Description: description,
ValidatorAddr: address,
CommissionRate: &newCommissionRate,
}
msg := staking.NewMsgEditValidator(address, description, &newCommissionRate, nil)
if msg.ValidateBasic() != nil {
return "", nil, fmt.Errorf("expected msg to pass ValidateBasic: %s", msg.GetSignBytes())
}
ctx, write := ctx.CacheContext()
result := handler(ctx, msg)
if result.IsOK() {