From 9c4e1927936fb257d2f84b7fa6432f34a0a2a4d7 Mon Sep 17 00:00:00 2001 From: Ramiro Carlucho Date: Fri, 4 Nov 2022 13:20:25 +0000 Subject: [PATCH] fix(testing): fix block proposer and allow Default gas to be modified (#2657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 (cherry picked from commit f69761d6fd14247e0f42a2e870f9f1cfb4905d5c) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 6 ++++++ testing/chain.go | 1 + testing/simapp/helpers/test_helpers.go | 8 ++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e918c0d1ecb..4114081143c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (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. * (apps/27-interchain-accounts) [\#2297](https://github.com/cosmos/ibc-go/pull/2297) Adding cli command to generate ICS27 packet data. * (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. +<<<<<<< HEAD +======= +* [\#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. +>>>>>>> f69761d (fix(testing): fix block proposer and allow Default gas to be modified (#2657)) ### Features diff --git a/testing/chain.go b/testing/chain.go index df3dc955740..cba17b0e8d3 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -291,6 +291,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}) diff --git a/testing/simapp/helpers/test_helpers.go b/testing/simapp/helpers/test_helpers.go index 9ccecbd976c..f4f55087815 100644 --- a/testing/simapp/helpers/test_helpers.go +++ b/testing/simapp/helpers/test_helpers.go @@ -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) {