Skip to content

Commit

Permalink
Update BundleDataClient.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 13, 2025
1 parent 988356a commit 34b6010
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions src/clients/BundleDataClient/BundleDataClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,6 @@ export class BundleDataClient {
fastFillsReplacingSlowFills.push(relayDataHash);
}
}
assert(
isDefined(v3RelayHashes[relayDataHash].deposits) && v3RelayHashes[relayDataHash].deposits!.length > 0,
"Deposit should exist in relay hash dictionary."
);
} else {
this.logger.debug({
at: "BundleDataClient#loadData",
Expand All @@ -950,6 +946,7 @@ export class BundleDataClient {
});
throw new Error("Duplicate fill detected");
}
return;
}

// At this point, there is no relay hash dictionary entry for this fill, so we need to
Expand Down Expand Up @@ -1075,26 +1072,6 @@ export class BundleDataClient {
});
throw new Error("Duplicate slow fill request detected.");
}
v3RelayHashes[relayDataHash].slowFillRequest = slowFillRequest;
if (v3RelayHashes[relayDataHash].fill) {
// Exiting here assumes that slow fill requests must precede fills, so if there was a fill
// following this slow fill request, then we would have already seen it. We don't need to check
// for a fill older than this slow fill request.
return;
}
assert(
isDefined(v3RelayHashes[relayDataHash].deposits) && v3RelayHashes[relayDataHash].deposits!.length > 0,
"Deposit should exist in relay hash dictionary."
);
const matchedDeposit = v3RelayHashes[relayDataHash].deposits![0];

if (
slowFillRequest.blockNumber >= destinationChainBlockRange[0] &&
_canCreateSlowFillLeaf(matchedDeposit) &&
!_depositIsExpired(matchedDeposit)
) {
validatedBundleSlowFills.push(matchedDeposit);
}
return;
}

Expand Down

0 comments on commit 34b6010

Please sign in to comment.