Skip to content

Commit

Permalink
estimatedDocumentCount to improve getReward api
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhson1085 committed Dec 31, 2019
1 parent 587272e commit 5bcd66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/candidates.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ router.get('/:candidate/:owner/getRewards', [
skip = (page) ? limit * (page - 1) : 0
let masternodesRW = []

const total = db.Status.countDocuments({
const total = db.Status.estimatedDocumentCount({
candidate: candidate,
epoch: {
$lte: currentEpoch - 2
Expand Down

0 comments on commit 5bcd66c

Please sign in to comment.