Skip to content

Commit

Permalink
Fix fetching remote keys in node assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Nov 3, 2024
1 parent 230bbb8 commit 889163e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/cli/test/utils/crucible/assertions/nodeAssertion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ export const nodeAssertion: Assertion<"node", {health: number; keyManagerKeys: s
if (node.validator.client === ValidatorClient.Lighthouse || getAllKeys(node.validator.keys).length === 0) {
keyManagerKeys = [];
} else {
const keys = (await node.validator.keyManager.listKeys()).value();
keyManagerKeys = keys.map((k) => k.validatingPubkey);
if (node.validator.keys.type === "local") {
const keys = (await node.validator.keyManager.listKeys()).value();
keyManagerKeys = keys.map((k) => k.validatingPubkey);
} else {
const keys = (await node.validator.keyManager.listRemoteKeys()).value();
keyManagerKeys = keys.map((k) => k.pubkey);
}
}

return {health, keyManagerKeys};
Expand Down

0 comments on commit 889163e

Please sign in to comment.