Skip to content

Commit

Permalink
Fix for get_stats removal in sync script
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHolyRoger committed Dec 29, 2019
1 parent 8072a2f commit 4881f77
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,16 +750,21 @@ module.exports = {
}
lib.get_supply( function (supply){
lib.get_connectioncount(function (connections) {
Stats.updateOne({coin: coin}, {
coin: coin,
count : count,
supply: supply,
connections: connections,
}, function() {
Stats.findOneAndUpdate({coin: coin}, {
$set: {
coin: coin,
count : count,
supply: supply,
connections: connections
}
}, {
new: true
}, function(err, new_stats) {
return cb({coin: coin,
count : count,
supply: supply,
connections: connections});
connections: connections,
last: new_stats.last});
});
});
});
Expand Down

0 comments on commit 4881f77

Please sign in to comment.