Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove setting of finalizeBlockState in FinalizeBlock + fix initialHeight + add ProcessProposal in tests/sims #16794

Merged
merged 11 commits into from
Jul 6, 2023
Prev Previous commit
Next Next commit
run ProcessProposal in simulations
  • Loading branch information
facundomedica committed Jun 30, 2023
commit ea943cd2776dbe604ac14474e02dc8d682fcaf13
15 changes: 15 additions & 0 deletions x/simulation/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,21 @@ func SimulateFromSeed(
// Run the BeginBlock handler
logWriter.AddEntry(BeginBlockEntry(blockHeight))

// Run ProcessProposal to remain compliant with the ABCI spec
_, err := app.ProcessProposal(&abci.RequestProcessProposal{
Txs: finalizeBlockReq.Txs,
ProposedLastCommit: finalizeBlockReq.DecidedLastCommit,
Misbehavior: finalizeBlockReq.Misbehavior,
Hash: finalizeBlockReq.Hash,
Height: finalizeBlockReq.Height,
Time: finalizeBlockReq.Time,
NextValidatorsHash: finalizeBlockReq.NextValidatorsHash,
ProposerAddress: finalizeBlockReq.ProposerAddress,
})
if err != nil {
return true, params, err
}

res, err := app.FinalizeBlock(finalizeBlockReq)
if err != nil {
return true, params, err
Expand Down