Skip to content

Commit

Permalink
Fix check-types
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Sep 22, 2022
1 parent e08019e commit ab612d0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ describe("getAttestationsForBlock", () => {
finalizedCheckpoint: {...finalizedCheckpoint, rootHex: toHexString(finalizedCheckpoint.root)},
unrealizedFinalizedCheckpoint: {...finalizedCheckpoint, rootHex: toHexString(finalizedCheckpoint.root)},
justifiedBalancesGetter: () => originalState.epochCtx.effectiveBalanceIncrements,
equivocatingIndices: new Set(),
};
forkchoice = new ForkChoice(originalState.config, fcStore, protoArray);
});
Expand Down
1 change: 1 addition & 0 deletions packages/beacon-node/test/utils/mocks/chain/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ function mockForkChoice(): IForkChoice {
getJustifiedCheckpoint: () => checkpoint,
onBlock: () => {},
onAttestation: () => {},
onAttesterSlashing: () => {},
getLatestMessage: () => undefined,
updateTime: () => {},
getTime: () => 0,
Expand Down
1 change: 0 additions & 1 deletion packages/fork-choice/src/forkChoice/forkChoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ 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);
// TODO: restore equivocatingIndices upon restart
intersectingIndices.forEach((validatorIndex) => this.fcStore.equivocatingIndices.add(validatorIndex));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe("ForkChoice", () => {
finalizedCheckpoint: {epoch: genesisEpoch, root: fromHexString(finalizedRoot), rootHex: finalizedRoot},
unrealizedFinalizedCheckpoint: {epoch: genesisEpoch, root: fromHexString(finalizedRoot), rootHex: finalizedRoot},
justifiedBalancesGetter: () => balances,
equivocatingIndices: new Set(),
};

forkchoice = new ForkChoice(config, fcStore, protoArr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe("computeDeltas", () => {
return votes;
},
fn: (votes) => {
computeDeltas(indices, votes, oldBalances, newBalances);
computeDeltas(indices, votes, oldBalances, newBalances, new Set());
},
});

Expand Down

0 comments on commit ab612d0

Please sign in to comment.