Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Jan 4, 2024
1 parent 8003ea3 commit 5b98b4e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/SpokePoolClient.fills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,13 @@ describe("SpokePoolClient: Fills", function () {
expect(fillBlock).to.be.undefined;

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

// 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 + 1),
findFillBlock(spokePool, deposit as RelayData, lateBlockNumber),
`${srcChain} deposit ${deposit.depositId} filled on ${dstChain} before block`
);
});
Expand Down

0 comments on commit 5b98b4e

Please sign in to comment.