From 85a52b74c1998dfebadfedbf287c9c9547cfec78 Mon Sep 17 00:00:00 2001
From: Philip Offtermatt
Date: Mon, 4 Mar 2024 09:51:59 +0100
Subject: [PATCH] Remove new block creation during consumer chain setup
---
tests/mbt/driver/setup.go | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/tests/mbt/driver/setup.go b/tests/mbt/driver/setup.go
index 69b385cb77..a794dce297 100644
--- a/tests/mbt/driver/setup.go
+++ b/tests/mbt/driver/setup.go
@@ -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