Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Jan 5, 2024
1 parent 0b4a2dd commit 6c0798c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/SpokePoolClient.fills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,20 @@ describe("SpokePoolClient: Fills", function () {
expect(fillBlock).to.be.undefined;

await buildFill(spokePool, destErc20, depositor, relayer1, deposit, 1);
await hre.network.provider.send("evm_mine");
const lateBlockNumber = await spokePool.provider.getBlockNumber();
await hre.network.provider.send("evm_mine");

// Now search for the fill _after_ it was filled and expect an exception.
const [srcChain, dstChain] = [getNetworkName(deposit.originChainId), getNetworkName(deposit.destinationChainId)];
await assertPromiseError(
findFillBlock(spokePool, deposit as RelayData, lateBlockNumber),
`${srcChain} deposit ${deposit.depositId} filled on ${dstChain} before block`
);

// Should assert if highBlock <= lowBlock.
await assertPromiseError(
findFillBlock(spokePool, deposit as RelayData, await spokePool.provider.getBlockNumber()),
"Block numbers out of range"
);
});
});

0 comments on commit 6c0798c

Please sign in to comment.