File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ export class GetterController implements OnModuleInit {
53
53
const chainId = chainConfig . chainId ;
54
54
const workerData = this . loadWorkerData ( chainConfig , globalGetterConfig ) ;
55
55
56
+ if ( workerData . incentivesAddresses . length == 0 ) {
57
+ this . loggerService . info (
58
+ { chainId } ,
59
+ 'Skipping getter worker creation: no incentive address to listen for found.' ,
60
+ ) ;
61
+ return ;
62
+ }
63
+
56
64
const worker = new Worker ( join ( __dirname , 'getter.service.js' ) , {
57
65
workerData,
58
66
} ) ;
@@ -98,7 +106,9 @@ export class GetterController implements OnModuleInit {
98
106
99
107
const incentivesAddresses = Array . from (
100
108
this . configService . ambsConfig . values ( ) ,
101
- ) . map ( ( amb ) => amb . getIncentivesAddress ( chainId ) ) ;
109
+ )
110
+ . map ( ( amb ) => amb . getIncentivesAddress ( chainId ) )
111
+ . filter ( ( address ) => address != undefined ) ;
102
112
103
113
return {
104
114
chainId,
Original file line number Diff line number Diff line change @@ -178,12 +178,15 @@ export class SubmitterService {
178
178
const relayerPrivateKey = this . configService . globalConfig . privateKey ;
179
179
180
180
const incentivesAddresses = new Map < string , string > ( ) ;
181
- this . configService . ambsConfig . forEach ( ( amb ) =>
182
- incentivesAddresses . set (
183
- amb . name ,
184
- amb . getIncentivesAddress ( chainConfig . chainId ) ,
185
- ) ,
186
- ) ;
181
+ this . configService . ambsConfig . forEach ( ( amb ) => {
182
+ const incentiveAddress = amb . getIncentivesAddress ( chainConfig . chainId ) ;
183
+ if ( incentiveAddress != undefined ) {
184
+ incentivesAddresses . set (
185
+ amb . name ,
186
+ amb . getIncentivesAddress ( chainConfig . chainId ) ,
187
+ ) ;
188
+ }
189
+ } ) ;
187
190
188
191
return {
189
192
chainId,
You can’t perform that action at this time.
0 commit comments