Skip to content

Commit

Permalink
fix: change up genTxGas for simulation, no err on no priv key sim acc
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsam committed Feb 15, 2022
1 parent 9716108 commit eab7f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion simapp/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// SimAppChainID hardcoded chainID for simulation
const (
DefaultGenTxGas = 1000000
DefaultGenTxGas = 10000000
SimAppChainID = "simulation-app"
)

Expand Down
4 changes: 2 additions & 2 deletions x/staking/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper
}
// if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error
if simAccount.PrivKey == nil {
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "account private key is nil"), nil, fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr)
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "account private key is nil"), nil, nil
}

account := ak.GetAccount(ctx, delAddr)
Expand Down Expand Up @@ -442,7 +442,7 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k

// if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error
if simAccount.PrivKey == nil {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr)
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, nil
}

account := ak.GetAccount(ctx, delAddr)
Expand Down

0 comments on commit eab7f98

Please sign in to comment.