Skip to content

Commit f69761d

Browse files
ramacarluchofedekunzecolin-axnercrodriguezvega
authored
fix(testing): fix block proposer and allow Default gas to be modified (#2657)
* carry block proposer, and allow Default gas to be modified * add changelog entry Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
1 parent fb996ca commit f69761d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
108108
* (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.
109109
* [\#2434](https://github.com/cosmos/ibc-go/pull/2478) Removed all `TypeMsg` constants
110110
* (modules/core/exported) [#1689] (https://github.com/cosmos/ibc-go/pull/2539) Removing `GetVersions` from `ConnectionI` interface.
111+
* (testing) [\#2657](https://github.com/cosmos/ibc-go/pull/2657) Carry `ProposerAddress` through commited blocks. Allow `DefaultGenTxGas` to be modified.
111112

112113
### Features
113114

testing/chain.go

+1
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ func (chain *TestChain) NextBlock() {
298298
Time: chain.CurrentHeader.Time,
299299
ValidatorsHash: chain.Vals.Hash(),
300300
NextValidatorsHash: chain.NextVals.Hash(),
301+
ProposerAddress: chain.CurrentHeader.ProposerAddress,
301302
}
302303

303304
chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader})

testing/simapp/helpers/test_helpers.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import (
1212
authsign "github.com/cosmos/cosmos-sdk/x/auth/signing"
1313
)
1414

15+
// DefaultGenTxGas default gas for tx simulation
16+
var DefaultGenTxGas = uint64(1000000)
17+
1518
// SimAppChainID hardcoded chainID for simulation
16-
const (
17-
DefaultGenTxGas = 1000000
18-
SimAppChainID = "simulation-app"
19-
)
19+
const SimAppChainID = "simulation-app"
2020

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

0 commit comments

Comments
 (0)