Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: fix block proposer and allow Default gas to be modified (backport #2657) #2683

Merged
merged 2 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* (testing) [\#2657](https://github.com/cosmos/ibc-go/pull/2657) Carry `ProposerAddress` through committed blocks. Allow `DefaultGenTxGas` to be modified.

### Features

* (apps/transfer) [\#2595](https://github.com/cosmos/ibc-go/pull/2595) Adding optional memo field to `FungibleTokenPacketData` and `MsgTransfer`.
Expand Down
1 change: 1 addition & 0 deletions testing/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
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