Skip to content

Commit

Permalink
Fix next block last header update
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt authored Jul 14, 2022
1 parent c48f8e2 commit 14e450f
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 @@ -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{
Expand Down

0 comments on commit 14e450f

Please sign in to comment.