Fix error reading "last" property during reindex

This commit is contained in:
joeuhren
2020-11-22 20:40:15 -07:00
parent 3341d8c152
commit f134eae57d
+4
View File
@@ -336,6 +336,7 @@ module.exports = {
create_stats: function(coin, cb) {
var newStats = new Stats({
coin: coin,
last: 0
});
newStats.save(function(err) {
@@ -782,6 +783,9 @@ module.exports = {
}, {
new: true
}, function(err, new_stats) {
if(err) {
console.log("Error during Stats Update:", err);
}
return cb({coin: coin,
count : count,
supply: supply,