Make Tendermint 0.35 block header test independent of block count

This commit is contained in:
Simon Warta 2022-06-20 12:07:57 +02:00
parent 42e39f91f4
commit e3e2b8151c

View File

@ -648,10 +648,6 @@ function websocketTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValue
expect(event.header.validatorsHash).toBeTruthy();
events.push(event);
if (events.length === 3) {
subscription.unsubscribe();
}
},
error: fail,
});
@ -662,6 +658,9 @@ function websocketTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValue
// wait for events to be processed
await sleep(100);
// Stop listening for new blocks
subscription.unsubscribe();
// We don't know exactly in which block the transactions are added. So we look into those
// with txs.
const eventsWithTx = events.filter((e) => e.txs.length > 0);