From b0c65265aa64e7480596579b3266ee3036479fd8 Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Wed, 30 Nov 2022 13:44:45 -0500 Subject: [PATCH] terra/tools: restore broadcast waiting fix --- terra/tools/deploy.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/terra/tools/deploy.js b/terra/tools/deploy.js index 948d3e238..5034db458 100644 --- a/terra/tools/deploy.js +++ b/terra/tools/deploy.js @@ -15,7 +15,13 @@ function sleep(ms) { } async function broadcastAndWait(terra, tx) { - return await terra.tx.broadcast(tx); + const response = await terra.tx.broadcast(tx); + let currentHeight = (await terra.tendermint.blockInfo()).block.header.height; + while (currentHeight <= response.height) { + await sleep(100); + currentHeight = (await terra.tendermint.blockInfo()).block.header.height; + } + return response; } /*