Harden "can limit by maxHeight" test

This commit is contained in:
Simon Warta 2023-03-02 13:35:02 +01:00
parent b9ca8cb38f
commit e6bf27f844

View File

@ -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);