added height to db

This commit is contained in:
bill bittner 2017-06-21 23:33:03 -07:00
parent b4e6a6662e
commit 15322c3639
5 changed files with 34 additions and 22 deletions
helpers/functions

View file

@ -16,8 +16,8 @@ function filterForFreePublicClaims (claimsListArray) {
return freePublicClaims;
}
function orderTopClaims (claimsListArray) {
logger.debug('ordering the top claims');
function orderClaims (claimsListArray) {
logger.debug('ordering the free public claims');
claimsListArray.sort((a, b) => {
if (a.amount === b.amount) {
return a.height < b.height;
@ -51,7 +51,7 @@ module.exports = claimName => {
return;
}
// order the claims
const orderedPublicClaims = orderTopClaims(freePublicClaims);
const orderedPublicClaims = orderClaims(freePublicClaims);
// resolve the promise
resolve(orderedPublicClaims);
})