Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: make multiple accounts warning more fault-tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnygleason committed Aug 28, 2019
1 parent 9e5557e commit bba4732
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,17 +580,12 @@ async function getClusterInfo() {
continue;
}
if (node.votePubkey && node.votePubkey != votePubkey) {
if (node.warning && node.warning.hasMultipleVoteAccounts) {
node.warning.hasMultipleVoteAccounts.push(
voteAccount.authorizedVoterPubkey,
);
} else {
node.warning |= {};
node.warning.hasMultipleVoteAccounts = [
node.votePubkey,
voteAccount.authorizedVoterPubkey,
];
}
node.warning |= {};
node.warning.hasMultipleVoteAccounts |= {};
node.warning.hasMultipleVoteAccounts[node.votePubkey] |= {};
node.warning.hasMultipleVoteAccounts[node.votePubkey][
voteAccount.authorizedVoterPubkey
] = true;
continue;
}
node.nodePubkey = nodePubkey;
Expand Down

0 comments on commit bba4732

Please sign in to comment.