From e6bf27f844ed7ae0dfb08e6ea8b84ff9b68241ef Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 2 Mar 2023 13:35:02 +0100 Subject: [PATCH] Harden "can limit by maxHeight" test --- .../tendermint-rpc/src/tendermint34/tendermint34client.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tendermint-rpc/src/tendermint34/tendermint34client.spec.ts b/packages/tendermint-rpc/src/tendermint34/tendermint34client.spec.ts index cf2d861c..5298e12f 100644 --- a/packages/tendermint-rpc/src/tendermint34/tendermint34client.spec.ts +++ b/packages/tendermint-rpc/src/tendermint34/tendermint34client.spec.ts @@ -344,7 +344,7 @@ function defaultTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValues) const height = (await client.status()).syncInfo.latestBlockHeight; const blockchain = await client.blockchain(undefined, height - 1); - expect(blockchain.lastHeight).toEqual(height); + expect(blockchain.lastHeight).toBeGreaterThanOrEqual(height); expect(blockchain.blockMetas.length).toBeGreaterThanOrEqual(2); expect(blockchain.blockMetas[0].header.height).toEqual(height - 1); // upper limit included expect(blockchain.blockMetas[1].header.height).toEqual(height - 2);