From 14e450fe77af90e7a16a4e4b16c712e162ee0544 Mon Sep 17 00:00:00 2001 From: Daniel T <30197399+danwt@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:08:21 +0100 Subject: [PATCH] Fix next block last header update See - https://github.com/cosmos/ibc-go/pull/1668 --- testing/chain.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/chain.go b/testing/chain.go index f760882048a..d1130151c44 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -301,14 +301,14 @@ func (chain *TestChain) NextBlock() (abci.ResponseEndBlock, abci.ResponseCommit, cRes := chain.App.Commit() - // set the last header to the current header - // use nil trusted fields - chain.LastHeader = chain.CurrentTMClientHeader() - // val set changes returned from previous block get applied to the next validators // of this block. See tendermint spec for details. chain.Vals = chain.NextVals chain.NextVals = ApplyValSetChanges(chain.T, chain.Vals, ebRes.ValidatorUpdates) + + // set the last header to the current header + // use nil trusted fields + chain.LastHeader = chain.CurrentTMClientHeader() // increment the current header chain.CurrentHeader = tmproto.Header{