Skip to content

Commit

Permalink
fix: bug in headAssertion of sim tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Aug 27, 2024
1 parent 9733cde commit 691b1d9
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ export const headAssertion: Assertion<"head", HeadSummary> = {
*/
const result = [`Slot,${nodes.map((n) => n.beacon.id).join(", ")}`];
for (let s = 1; s <= slot; s++) {
result.push(`${s}, ${nodes.map((n) => store[n.beacon.id][s].blockRoot ?? "-").join(",")}`);
result.push(
`${s}, ${nodes
.map((n) => {
const nodeStore = store[n.beacon.id];
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
const desiredSlot = nodeStore ? nodeStore[s] : undefined;
return desiredSlot ? desiredSlot.blockRoot : "not found";
})
.join(",")}`
);
}
return {"headAssertion.csv": result.join("\n")};
},
Expand Down

0 comments on commit 691b1d9

Please sign in to comment.