Skip to content

Commit

Permalink
Update code as per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Mar 20, 2024
1 parent 094b1bb commit c69d5d5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {capella} from "@lodestar/types";
import {ApiError} from "@lodestar/api";
import {MAX_WITHDRAWALS_PER_PAYLOAD} from "@lodestar/params";
Expand All @@ -23,12 +22,11 @@ export function createWithdrawalAssertions<T extends string>(
},
async capture({block, node, slot}) {
const withdrawals = (block as capella.SignedBeaconBlock).message.body.executionPayload.withdrawals;
let withdrawalCount = 0;
const withdrawalCount = withdrawals.length;
let withdrawalAmount = BigInt(0);
const validators: WithdrawalsData["validators"] = {};

for (const withdrawal of withdrawals) {
withdrawalCount++;
withdrawalAmount += withdrawal.amount;
const validatorDataLastSlot = await node.beacon.api.beacon.getStateValidator(
slot - 1,
Expand Down

0 comments on commit c69d5d5

Please sign in to comment.