Skip to content

Commit

Permalink
Adapt CommitNBlocks to NextBlock updates (cosmos#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe authored and Daniel committed Jun 10, 2022
1 parent 7891708 commit 24fa424
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions testing/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func GetChainID(index int) string {
// CONTRACT: the passed in list of indexes must not contain duplicates
func (coord *Coordinator) CommitBlock(chains ...*TestChain) {
for _, chain := range chains {

// NextBlock calls app.Commit()
chain.NextBlock()
}
coord.IncrementTime()
Expand All @@ -190,9 +190,6 @@ func (coord *Coordinator) CommitBlock(chains ...*TestChain) {
// CommitNBlocks commits n blocks to state and updates the block height by 1 for each commit.
func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) {
for i := uint64(0); i < n; i++ {
chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader})
chain.App.EndBlock(abci.RequestEndBlock{Height: chain.CurrentHeader.Height})
chain.App.Commit()
chain.NextBlock()
coord.IncrementTime()
}
Expand Down

0 comments on commit 24fa424

Please sign in to comment.