Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
🐛 Fix validators rank calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
nagdahimanshu committed Oct 31, 2023
1 parent 8b1c9a3 commit 79c696a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let validatorList = [];
const validatorComparator = (a, b) => {
const diff = BigInt(b.validatorWeight) - BigInt(a.validatorWeight);
if (diff !== BigInt('0')) return Number(diff);
return Buffer.from(a.hexAddress, 'hex').compare(Buffer.from(b.hexAddress, 'hex'));
return Buffer.from(b.hexAddress, 'hex').compare(Buffer.from(a.hexAddress, 'hex'));
};

const computeValidatorRank = async () => {
Expand Down

0 comments on commit 79c696a

Please sign in to comment.