uaktags / explorer

An open source block explorer
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

initial install issue - Both Master and Cluster affected #28

Closed uaktags closed 5 years ago

uaktags commented 5 years ago

So, to test this out, I simply just deleted all the collections, ran "npm start" to recreate the collections for a new install, and then ran the node scripts/sync.js index reindex, or update. Either one should work fine, but it appears that because of the way we get the "end" we break. https://github.com/uaktags/explorer/blob/8ed38ea51b23a9d466bf41d0c5705fbbf869392d/scripts/sync.js#L140-L141 This is where the problem seems to come into play.

db.update_db is suppose to set the stats.count to what the current blockcount is. Then right after all that is done, it's db.get_stats which pulls that information (a redundant call), but for whatever reason we still get left with a 0.