diff --git a/packages/fork-choice/src/protoArray/protoArray.ts b/packages/fork-choice/src/protoArray/protoArray.ts index 54df206b43cd..714d338cb661 100644 --- a/packages/fork-choice/src/protoArray/protoArray.ts +++ b/packages/fork-choice/src/protoArray/protoArray.ts @@ -217,15 +217,14 @@ export class ProtoArray { }; const nodeIndex = this.nodes.length; - this.indices.set(node.blockRoot, nodeIndex); this.nodes.push(node); - // If this node is valid, lets propagate the valid status up the chain - // and throw error if we counter invalid, as this breaks consensus if (node.parent !== undefined) { this.maybeUpdateBestChildAndDescendant(node.parent, nodeIndex, currentSlot); + // If this node is valid, lets propagate the valid status up the chain + // and throw error if we counter invalid, as this breaks consensus if (node.executionStatus === ExecutionStatus.Valid) { this.propagateValidExecutionStatusByIndex(node.parent); }