@@ -34,11 +34,11 @@ export type FundManagement = {
34
34
} ;
35
35
36
36
// Some operations on this class require us to scan back over the blockchain
37
- // to find published events. This is done in batches of blocks. The chunk size in this set of properties
37
+ // to find published events. This is done in batches of blocks. The batch size in this set of properties
38
38
// determines how many blocks to request in each batch.
39
39
// Users of this class can customise this to their provider requirements
40
40
export type ChainProperties = {
41
- chunkSize : number ;
41
+ eventBatchSize : number ;
42
42
} ;
43
43
44
44
interface EventBlock {
@@ -84,7 +84,7 @@ export class ElementBridgeData implements BridgeDataFieldGetters {
84
84
elementBridgeAddress : EthAddress ,
85
85
balancerAddress : EthAddress ,
86
86
rollupContractAddress : EthAddress ,
87
- chainProperties : ChainProperties = { chunkSize : 10000 } ,
87
+ chainProperties : ChainProperties = { eventBatchSize : 10000 } ,
88
88
) {
89
89
const ethersProvider = createWeb3Provider ( provider ) ;
90
90
const elementBridgeContract = ElementBridge__factory . connect ( elementBridgeAddress . toString ( ) , ethersProvider ) ;
@@ -150,7 +150,7 @@ export class ElementBridgeData implements BridgeDataFieldGetters {
150
150
}
151
151
152
152
let end = latestBlockNumber ;
153
- let start = end - ( this . chainProperties . chunkSize - 1 ) ;
153
+ let start = end - ( this . chainProperties . eventBatchSize - 1 ) ;
154
154
start = Math . max ( start , earliestBlockNumber ) ;
155
155
156
156
while ( end > earliestBlockNumber ) {
@@ -171,7 +171,7 @@ export class ElementBridgeData implements BridgeDataFieldGetters {
171
171
172
172
// if we didn't find an event then go round again but search further back in time
173
173
end = start - 1 ;
174
- start = end - ( this . chainProperties . chunkSize - 1 ) ;
174
+ start = end - ( this . chainProperties . eventBatchSize - 1 ) ;
175
175
start = Math . max ( start , earliestBlockNumber ) ;
176
176
}
177
177
}
0 commit comments