IBC testing code runs outside of abci lifecycle with TestChain
#6024
Labels
needs discussion
Issues that need discussion before they can be worked on
testing
Testing package and unit/integration tests
type: bug
Something isn't working as expected
Summary of Bug
When actions are performs when using the ibctesting library and a msg is sent to the desired chain we generally call
NextBlock
on the test chain which invokes the abci callback methodFinalizeBlock
.With the introduction of
FinalizeBlock
in abci++, the following legacy abci methods are composed into the one step:This means that taking action or setting up test code stubs using the current height from the chain context will yield results which do not include module actions taken on steps such as
PreBlock
orBeginBlock
. For example, historical info at the current chain height is not stored inx/staking
untilBeginBlock
is called. This may lead to unexpected results or test behaviour.Expected Behaviour
Test code runs within a valid context of the abci lifecycle - e.g. the
deliverTx
step.Version
main
Steps to Reproduce
See example in PR where this was caught: https://github.com/cosmos/ibc-go/pull/6018/files#r1530522751
For Admin Use
The text was updated successfully, but these errors were encountered: