Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,10 @@ contract DisputeGameFactory_FindLatestGames_Test is DisputeGameFactory_TestInit
disputeGameFactory.create(GameType.wrap(gameType), Claim.wrap(bytes32(i)), abi.encode(i));
}

// Ensure that the correct number of games are returned.
uint256 start = _numGames == 0 ? 0 : _numGames - 1;
// Ensure that the correct number of games are returned. Search from the newest game:
// on a fork the factory already holds the chain's own games before the new ones.
uint256 gameCount = disputeGameFactory.gameCount();
uint256 start = gameCount == 0 ? 0 : gameCount - 1;
Comment thread
teddyknox marked this conversation as resolved.
Resolved
IDisputeGameFactory.GameSearchResult[] memory games =
disputeGameFactory.findLatestGames(GameType.wrap(0), start, _n);
assertEq(games.length, _n);
Expand Down
Loading