diff --git a/packages/beacon-node/src/chain/chain.ts b/packages/beacon-node/src/chain/chain.ts index 448e55f3b8de..aee2068f6f70 100644 --- a/packages/beacon-node/src/chain/chain.ts +++ b/packages/beacon-node/src/chain/chain.ts @@ -965,9 +965,9 @@ export class BeaconChain implements IBeaconChain { } async updateBeaconProposerData(epoch: Epoch, proposers: ProposerPreparationData[]): Promise { - proposers.forEach((proposer) => { + for (const proposer of proposers) { this.beaconProposerCache.add(epoch, proposer); - }); + } } updateBuilderStatus(clockSlot: Slot): void { diff --git a/packages/beacon-node/src/network/processor/index.ts b/packages/beacon-node/src/network/processor/index.ts index 6fd0b235dfb1..ba84c9b12a60 100644 --- a/packages/beacon-node/src/network/processor/index.ts +++ b/packages/beacon-node/src/network/processor/index.ts @@ -433,7 +433,9 @@ export class NetworkProcessor { ]; if (Array.isArray(messageOrArray)) { - messageOrArray.forEach((msg) => this.trackJobTime(msg, messageOrArray.length)); + for (const msg of messageOrArray) { + this.trackJobTime(msg, messageOrArray.length); + } } else { this.trackJobTime(messageOrArray, 1); } diff --git a/packages/fork-choice/src/forkChoice/forkChoice.ts b/packages/fork-choice/src/forkChoice/forkChoice.ts index 396146b193c7..32732e45fb6e 100644 --- a/packages/fork-choice/src/forkChoice/forkChoice.ts +++ b/packages/fork-choice/src/forkChoice/forkChoice.ts @@ -547,7 +547,9 @@ export class ForkChoice implements IForkChoice { onAttesterSlashing(attesterSlashing: phase0.AttesterSlashing): void { // TODO: we already call in in state-transition, find a way not to recompute it again const intersectingIndices = getAttesterSlashableIndices(attesterSlashing); - intersectingIndices.forEach((validatorIndex) => this.fcStore.equivocatingIndices.add(validatorIndex)); + for (const validatorIndex of intersectingIndices) { + this.fcStore.equivocatingIndices.add(validatorIndex); + } } getLatestMessage(validatorIndex: ValidatorIndex): LatestMessage | undefined {