Skip to content

Commit 370b533

Browse files
mergify[bot]ramacarluchocrodriguezvega
authored
Testing: fix block proposer and allow Default gas to be modified (backport #2657) (#2684)
* 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> (cherry picked from commit f69761d) # Conflicts: # CHANGELOG.md * fix conflict Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
1 parent 51a4f0f commit 370b533

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
@@ -76,6 +76,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
7676
* (apps/27-interchain-accounts) [\#2290](https://github.com/cosmos/ibc-go/pull/2290) Changed `DefaultParams` function in `host` submodule to allow all messages by default. Defined a constant named `AllowAllHostMsgs` for `host` module to keep wildcard "*" string which allows all messages.
7777
* (apps/27-interchain-accounts) [\#2297](https://github.com/cosmos/ibc-go/pull/2297) Adding cli command to generate ICS27 packet data.
7878
* (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.
79+
* (testing) [\#2657](https://github.com/cosmos/ibc-go/pull/2657) Carry `ProposerAddress` through commited blocks. Allow `DefaultGenTxGas` to be modified.
7980

8081
### Features
8182

testing/chain.go

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ func (chain *TestChain) NextBlock() {
291291
Time: chain.CurrentHeader.Time,
292292
ValidatorsHash: chain.Vals.Hash(),
293293
NextValidatorsHash: chain.NextVals.Hash(),
294+
ProposerAddress: chain.CurrentHeader.ProposerAddress,
294295
}
295296

296297
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)