mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Merge pull request #1183 from cosmos/unsubscribe-later
Make Tendermint 0.35 block header test independent of block count
This commit is contained in:
commit
44013d9b16
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user