Skip to content

Commit

Permalink
fix(testing): fix block proposer and allow Default gas to be modified (
Browse files Browse the repository at this point in the history
…#2657)

* carry block proposer, and allow Default gas to be modified

* add changelog entry

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
  • Loading branch information
4 people authored Nov 4, 2022
1 parent fb996ca commit f69761d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (modules/core/keeper) [\#1728](https://github.com/cosmos/ibc-go/pull/2399) Updated channel callback errors to include portID & channelID for better identification of errors.
* [\#2434](https://github.com/cosmos/ibc-go/pull/2478) Removed all `TypeMsg` constants
* (modules/core/exported) [#1689] (https://github.com/cosmos/ibc-go/pull/2539) Removing `GetVersions` from `ConnectionI` interface.
* (testing) [\#2657](https://github.com/cosmos/ibc-go/pull/2657) Carry `ProposerAddress` through commited blocks. Allow `DefaultGenTxGas` to be modified.

### Features

Expand Down
1 change: 1 addition & 0 deletions testing/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ func (chain *TestChain) NextBlock() {
Time: chain.CurrentHeader.Time,
ValidatorsHash: chain.Vals.Hash(),
NextValidatorsHash: chain.NextVals.Hash(),
ProposerAddress: chain.CurrentHeader.ProposerAddress,
}

chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader})
Expand Down
8 changes: 4 additions & 4 deletions testing/simapp/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
authsign "github.com/cosmos/cosmos-sdk/x/auth/signing"
)

// DefaultGenTxGas default gas for tx simulation
var DefaultGenTxGas = uint64(1000000)

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

// GenTx generates a signed mock transaction.
func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) {
Expand Down

0 comments on commit f69761d

Please sign in to comment.