From 27dc704b7dec6ccc379ee54f6df4aef16403efd5 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 4 Aug 2023 11:05:22 +0200 Subject: [PATCH] fix(testing): update validator before UpdateClient call --- testing/chain.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/chain.go b/testing/chain.go index 4a1a2f5db25..c29f1c04196 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -279,15 +279,15 @@ func (chain *TestChain) NextBlock() { 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, res.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{ ChainID: chain.ChainID,