From dc14eef639a0bfc61b113dba6d36a2b1aecc3892 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Wed, 18 Jul 2018 09:47:55 +0200 Subject: [PATCH] Clarify 'nop', linter fix --- examples/democoin/mock/validator.go | 5 +++++ x/stake/simulation/msgs.go | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/democoin/mock/validator.go b/examples/democoin/mock/validator.go index 84d41d488..c3d01b170 100644 --- a/examples/democoin/mock/validator.go +++ b/examples/democoin/mock/validator.go @@ -28,6 +28,11 @@ func (v Validator) GetPubKey() crypto.PubKey { return nil } +// Implements sdk.Validator +func (v Validator) GetTokens() sdk.Rat { + return sdk.ZeroRat() +} + // Implements sdk.Validator func (v Validator) GetPower() sdk.Rat { return v.Power diff --git a/x/stake/simulation/msgs.go b/x/stake/simulation/msgs.go index 597046107..41bda5dd6 100644 --- a/x/stake/simulation/msgs.go +++ b/x/stake/simulation/msgs.go @@ -32,7 +32,7 @@ func SimulateMsgCreateValidator(m auth.AccountMapper, k stake.Keeper) simulation amount = sdk.NewInt(int64(r.Intn(int(amount.Int64())))) } if amount.Equal(sdk.ZeroInt()) { - return "nop", nil + return "no-operation", nil } msg := stake.MsgCreateValidator{ Description: description, @@ -95,7 +95,7 @@ func SimulateMsgDelegate(m auth.AccountMapper, k stake.Keeper) simulation.TestAn amount = sdk.NewInt(int64(r.Intn(int(amount.Int64())))) } if amount.Equal(sdk.ZeroInt()) { - return "nop", nil + return "no-operation", nil } msg := stake.MsgDelegate{ DelegatorAddr: delegatorAddress, @@ -127,7 +127,7 @@ func SimulateMsgBeginUnbonding(m auth.AccountMapper, k stake.Keeper) simulation. amount = sdk.NewInt(int64(r.Intn(int(amount.Int64())))) } if amount.Equal(sdk.ZeroInt()) { - return "nop", nil + return "no-operation", nil } msg := stake.MsgBeginUnbonding{ DelegatorAddr: delegatorAddress, @@ -185,7 +185,7 @@ func SimulateMsgBeginRedelegate(m auth.AccountMapper, k stake.Keeper) simulation amount = sdk.NewInt(int64(r.Intn(int(amount.Int64())))) } if amount.Equal(sdk.ZeroInt()) { - return "nop", nil + return "no-operation", nil } msg := stake.MsgBeginRedelegate{ DelegatorAddr: delegatorAddress,