We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2445fe0 commit e76a7b5Copy full SHA for e76a7b5
src/jobs/validators/validators.service.ts
@@ -178,7 +178,10 @@ export class ValidatorsService {
178
179
protected async getLastWithdrawalValidatorIndex() {
180
const withdrawals = await this.executionProviderService.getLatestWithdrawals();
181
- return BigNumber.from(withdrawals[withdrawals.length - 1].validatorIndex);
+ const lastWithdrawal = withdrawals[withdrawals.length - 1];
182
+
183
+ this.logger.log('Found last withdrawal', { lastWithdrawal });
184
+ return BigNumber.from(lastWithdrawal ? lastWithdrawal.validatorIndex : 0);
185
}
186
187
protected logAnalyticsAboutWithdrawableBalances(activeValidatorCount: number, latestEpoch: string) {
0 commit comments