From 2fe4d51607fd295f167851bedd2003313d5c47b6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 14 Jun 2022 16:48:58 +0200 Subject: [PATCH] Stabilize block headers test --- .../src/tendermint35/tendermint35client.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/tendermint-rpc/src/tendermint35/tendermint35client.spec.ts b/packages/tendermint-rpc/src/tendermint35/tendermint35client.spec.ts index d26108be..96058c40 100644 --- a/packages/tendermint-rpc/src/tendermint35/tendermint35client.spec.ts +++ b/packages/tendermint-rpc/src/tendermint35/tendermint35client.spec.ts @@ -350,9 +350,10 @@ function defaultTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValues) const height = (await client.status()).syncInfo.latestBlockHeight; const blockchain = await client.blockchain(undefined, height + 20); expect(blockchain.lastHeight).toBeGreaterThanOrEqual(height); - expect(blockchain.blockMetas.length).toBeGreaterThanOrEqual(2); - expect(blockchain.blockMetas[0].header.height).toEqual(height); - expect(blockchain.blockMetas[1].header.height).toEqual(height - 1); + expect(blockchain.blockMetas.length).toBeGreaterThanOrEqual(3); + expect(blockchain.blockMetas[0].header.height).toEqual(blockchain.lastHeight); + expect(blockchain.blockMetas[1].header.height).toEqual(blockchain.lastHeight - 1); + expect(blockchain.blockMetas[2].header.height).toEqual(blockchain.lastHeight - 2); client.disconnect(); });