Fix for get_stats removal in sync script

This commit is contained in:
joeuhren
2020-11-22 20:16:00 -07:00
parent db555e3dc5
commit d9940424b4
+12 -7
View File
@@ -772,16 +772,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});
});
});
});