Skip to content

Commit

Permalink
Remove new block creation during consumer chain setup
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Mar 4, 2024
1 parent 791e582 commit 85a52b7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/mbt/driver/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,21 +397,15 @@ func (s *Driver) ConfigureNewPath(consumerChain, providerChain *ibctesting.TestC
// their channel, and are ready for anything to happen.
s.consumerKeeper(consumerChainId).SetProviderChannel(s.ctx(consumerChainId), consumerEndPoint.ChannelID)

// Commit a block on both chains, giving us two committed headers from
// the same time and height. This is the starting point for all our
// data driven testing.
// Commit a block on the consumer to get a header
lastConsumerHeader, _ := simibc.EndBlock(consumerChain, func() {})
lastProviderHeader, _ := simibc.EndBlock(providerChain, func() {})

// Get ready to update clients.
simibc.BeginBlock(providerChain, 5)
// Begin a block on the consumer to get it ready for testing
simibc.BeginBlock(consumerChain, 5)

// Update clients to the latest header.
// Update the client on the provider with the latest consumer header
err = simibc.UpdateReceiverClient(consumerEndPoint, providerEndPoint, lastConsumerHeader, false)
require.NoError(s.t, err, "Error updating client on consumer for chain %v", consumerChain.ChainID)
err = simibc.UpdateReceiverClient(providerEndPoint, consumerEndPoint, lastProviderHeader, false)
require.NoError(s.t, err, "Error updating client on provider for chain %v", consumerChain.ChainID)

// path is ready to go
return path
Expand Down

0 comments on commit 85a52b7

Please sign in to comment.