Skip to content

Commit

Permalink
fix(testing): update validator before UpdateClient call
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Aug 4, 2023
1 parent 000e9d2 commit 27dc704
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 27dc704

Please sign in to comment.