terra/tools: restore broadcast waiting fix
This commit is contained in:
parent
bca681cddb
commit
b0c65265aa
|
@ -15,7 +15,13 @@ function sleep(ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function broadcastAndWait(terra, tx) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue