Fix for get_stats removal in sync script
This commit is contained in:
+12
-7
@@ -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});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user