Browse Source

search bch txps

master
JDonadio 7 years ago
parent
commit
1949924c1c
No known key found for this signature in database GPG Key ID: EC1F4E04B2BFA730
  1. 5
      lib/stats.js

5
lib/stats.js

@ -185,7 +185,7 @@ Stats.prototype._getTxProposals = function(cb) {
function getLastDate(cb) {
self.db.collection('stats_txps')
.find({})
.find({'_id.coin': self.coin })
.sort({
'_id.day': -1
})
@ -206,6 +206,7 @@ Stats.prototype._getTxProposals = function(cb) {
var key = {
day: +day,
network: this.network,
coin: this.coin
};
var value = {
count: 1,
@ -247,6 +248,7 @@ Stats.prototype._getTxProposals = function(cb) {
self.db.collection('stats_txps')
.find({
'_id.network': self.network,
'_id.coin': self.coin,
'_id.day': {
$gte: self.fromTs,
$lte: self.toTs,
@ -266,6 +268,7 @@ Stats.prototype._getTxProposals = function(cb) {
var day = moment(record._id.day).format('YYYYMMDD');
stats.nbByDay.push({
day: day,
coin: record._id.coin,
count: record.value.count,
});
stats.amountByDay.push({

Loading…
Cancel
Save