From 8554981f8d7837c3078cd67e6a16e88fc5786e66 Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Mon, 23 Nov 2020 20:22:40 -0700 Subject: [PATCH] Couple of fixes for initial indexing - stats.supply and stats.last --- lib/database.js | 2 +- lib/explorer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/database.js b/lib/database.js index 36dcb6a..f984538 100644 --- a/lib/database.js +++ b/lib/database.js @@ -746,7 +746,7 @@ module.exports = { count : count, supply: supply, connections: connections, - last: new_stats.last}); + last: (new_stats.last ? new_stats.last : 0)}); }); }); }); diff --git a/lib/explorer.js b/lib/explorer.js index 3094fab..d002639 100644 --- a/lib/explorer.js +++ b/lib/explorer.js @@ -15,7 +15,7 @@ function coinbase_supply(cb) { if (address) { return cb(address.sent); } else { - return cb(); + return cb(0); } }); }