Created
May 9, 2016 13:43
-
-
Save fix/c234f403ede5b1cb75590ec166b0244e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private.getKeysSortByVote = function (cb) { | |
modules.accounts.getAccounts({ | |
isDelegate: 1, | |
sort: { "vote": -1, "publicKey": 1 }, | |
limit: slots.delegates | |
}, ["publicKey"], function (err, rows) { | |
if (err) { | |
cb(err) | |
} | |
cb(null, rows.map(function (el) { | |
return el.publicKey | |
})) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment