@@ -115,18 +115,6 @@ describe('ContractSyncService', () => {
115115 expectSyncedScopes ( [ scopeA ] , [ scopeB ] ) ;
116116 } ) ;
117117
118- it ( 'skips sync for excluded contract in the same job' , async ( ) => {
119- service . setExcludedFromSync ( jobId , new Set ( [ contractAddress . toString ( ) ] ) ) ;
120- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
121- expectNoSync ( ) ;
122- } ) ;
123-
124- it ( 'does not skip sync for excluded contract in a different job' , async ( ) => {
125- service . setExcludedFromSync ( 'other-job' , new Set ( [ contractAddress . toString ( ) ] ) ) ;
126- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
127- expectSyncedScopes ( [ scopeA ] ) ;
128- } ) ;
129-
130118 it ( 'concurrent calls for same contract+scope share one sync promise' , async ( ) => {
131119 const p1 = service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [
132120 scopeA ,
@@ -170,16 +158,6 @@ describe('ContractSyncService', () => {
170158 } ) ;
171159
172160 describe ( 'commit' , ( ) => {
173- it ( 'clears exclusions for the given job' , async ( ) => {
174- service . setExcludedFromSync ( jobId , new Set ( [ contractAddress . toString ( ) ] ) ) ;
175- await service . commit ( jobId ) ;
176-
177- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
178- // When exclusions are set, contract sync is skipped. We verify the exclusions were cleared by confirming that sync
179- // was actually triggered.
180- expectSyncedScopes ( [ scopeA ] ) ;
181- } ) ;
182-
183161 it ( 'does not clear sync cache' , async ( ) => {
184162 await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
185163 await service . commit ( jobId ) ;
@@ -197,32 +175,6 @@ describe('ContractSyncService', () => {
197175 // We check that the sync cache was cleared by checking that the sync was triggered twice.
198176 expectSyncedScopes ( [ scopeA ] , [ scopeA ] ) ;
199177 } ) ;
200-
201- it ( 'clears exclusions for the given job' , async ( ) => {
202- service . setExcludedFromSync ( jobId , new Set ( [ contractAddress . toString ( ) ] ) ) ;
203- await service . discardStaged ( jobId ) ;
204-
205- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
206- // When exclusions are set, contract sync is skipped. We verify the exclusions were cleared by confirming that sync
207- // was actually triggered.
208- expectSyncedScopes ( [ scopeA ] ) ;
209- } ) ;
210-
211- it ( 'preserves exclusions for other jobs' , async ( ) => {
212- service . setExcludedFromSync ( jobId , new Set ( [ contractAddress . toString ( ) ] ) ) ;
213- service . setExcludedFromSync ( 'other-job' , new Set ( [ contractAddress . toString ( ) ] ) ) ;
214- await service . discardStaged ( jobId ) ;
215-
216- // jobId exclusion cleared, sync proceeds
217- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , jobId , [ scopeA ] ) ;
218- expectSyncedScopes ( [ scopeA ] ) ;
219-
220- // other-job exclusion still active, sync skipped
221- await service . ensureContractSynced ( contractAddress , null , utilityExecutor , anchorBlockHeader , 'other-job' , [
222- scopeA ,
223- ] ) ;
224- expectSyncedScopes ( [ scopeA ] ) ;
225- } ) ;
226178 } ) ;
227179
228180 describe ( 'class ID verification deduplication' , ( ) => {
0 commit comments