refactor: remove unused context argument from types/simulation.RandomFees (#17737)

This commit is contained in:
Elias Naur
2023-09-14 08:50:49 +00:00
committed by GitHub
parent 4e46c2fac1
commit e90e5e1f97
12 changed files with 29 additions and 28 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ func FindAccount(accs []Account, address sdk.Address) (Account, bool) {
// RandomFees returns a random fee by selecting a random coin denomination and
// amount from the account's available balance. If the user doesn't have enough
// funds for paying fees, it returns empty coins.
func RandomFees(r *rand.Rand, ctx sdk.Context, spendableCoins sdk.Coins) (sdk.Coins, error) {
func RandomFees(r *rand.Rand, spendableCoins sdk.Coins) (sdk.Coins, error) {
if spendableCoins.Empty() {
return nil, nil
}
+1 -1
View File
@@ -68,7 +68,7 @@ func TestRandomFees(t *testing.T) {
tt := tt
t.Run(tt.name, func(t *testing.T) {
got, err := simulation.RandomFees(r, sdk.Context{}, tt.spendableCoins)
got, err := simulation.RandomFees(r, tt.spendableCoins)
if (err != nil) != tt.wantErr {
t.Errorf("RandomFees() error = %v, wantErr %v", err, tt.wantErr)
return