@@ -697,6 +697,7 @@ export class BundleDataClient {
697697 const bundleFillsV3 : BundleFillsV3 = { } ; // Fills to refund in bundle block range.
698698 const bundleInvalidFillsV3 : V3FillWithBlock [ ] = [ ] ; // Fills that are not valid in this bundle.
699699 const bundleUnrepayableFillsV3 : V3FillWithBlock [ ] = [ ] ; // Fills that are not repayable in this bundle.
700+ const bundleInvalidSlowFillRequests : SlowFillRequestWithBlock [ ] = [ ] ; // Slow fill requests that are not valid in this bundle.
700701 const bundleSlowFillsV3 : BundleSlowFills = { } ; // Deposits that we need to send slow fills
701702 // for in this bundle.
702703 const expiredDepositsToRefundV3 : ExpiredDepositsToRefundV3 = { } ;
@@ -1111,18 +1112,21 @@ export class BundleDataClient {
11111112 // want to perform a binary search lookup for it because the deposit ID is "unsafe" and cannot be
11121113 // found using such a method) because infinite fill deadlines cannot be produced from the unsafeDepositV3()
11131114 // function.
1114- if (
1115- INFINITE_FILL_DEADLINE . eq ( slowFillRequest . fillDeadline ) &&
1116- slowFillRequest . blockNumber >= destinationChainBlockRange [ 0 ]
1117- ) {
1115+ if ( slowFillRequest . blockNumber >= destinationChainBlockRange [ 0 ] ) {
1116+ if ( ! INFINITE_FILL_DEADLINE . eq ( slowFillRequest . fillDeadline ) ) {
1117+ bundleInvalidSlowFillRequests . push ( slowFillRequest ) ;
1118+ return ;
1119+ }
11181120 const historicalDeposit = await queryHistoricalDepositForFill ( originClient , slowFillRequest ) ;
11191121 if ( ! historicalDeposit . found ) {
1122+ bundleInvalidSlowFillRequests . push ( slowFillRequest ) ;
11201123 return ;
11211124 }
11221125 const matchedDeposit : V3DepositWithBlock = historicalDeposit . deposit ;
11231126 // If deposit is in a following bundle, then this slow fill request will have to be created
11241127 // once that deposit is in the current bundle.
11251128 if ( matchedDeposit . blockNumber > originChainBlockRange [ 1 ] ) {
1129+ bundleInvalidSlowFillRequests . push ( slowFillRequest ) ;
11261130 return ;
11271131 }
11281132 // @dev Since queryHistoricalDepositForFill validates the slow fill request by checking individual
@@ -1443,7 +1447,7 @@ export class BundleDataClient {
14431447 if ( bundleInvalidFillsV3 . length > 0 ) {
14441448 this . logger . debug ( {
14451449 at : "BundleDataClient#loadData" ,
1446- message : "Finished loading V3 spoke pool data and found some invalid V3 fills in range" ,
1450+ message : "Finished loading V3 spoke pool data and found some invalid fills in range" ,
14471451 blockRangesForChains,
14481452 bundleInvalidFillsV3,
14491453 } ) ;
@@ -1452,12 +1456,21 @@ export class BundleDataClient {
14521456 if ( bundleUnrepayableFillsV3 . length > 0 ) {
14531457 this . logger . debug ( {
14541458 at : "BundleDataClient#loadData" ,
1455- message : "Finished loading V3 spoke pool data and found some unrepayable V3 fills in range" ,
1459+ message : "Finished loading V3 spoke pool data and found some unrepayable fills in range" ,
14561460 blockRangesForChains,
14571461 bundleUnrepayableFillsV3,
14581462 } ) ;
14591463 }
14601464
1465+ if ( bundleInvalidSlowFillRequests . length > 0 ) {
1466+ this . logger . debug ( {
1467+ at : "BundleDataClient#loadData" ,
1468+ message : "Finished loading V3 spoke pool data and found some invalid slow fill requests in range" ,
1469+ blockRangesForChains,
1470+ bundleInvalidSlowFillRequests,
1471+ } ) ;
1472+ }
1473+
14611474 this . logger . debug ( {
14621475 at : "BundleDataClient#loadDataFromScratch" ,
14631476 message : `Computed bundle data in ${ Math . round ( performance . now ( ) - start ) / 1000 } s.` ,
0 commit comments