Closed sudormdir closed 1 year ago
I got inpatient and ran npm run delete-database
and then npm run sync-blocks
. That did the trick. Was happy to find that delete-database didn't really delete the database, it just erased its contents.
Sorry for the late reply and thanks for the details about how you resolved this issue. It is already on my list to update the reindex process so that it essentially calls the delete-database script which is more complete and much faster than the current reindex.
You are also correct that the issue occurred because you changed the difficulty value after syncing the initial data. For anyone else reading that has a similar issue and doesn't want to reindex the explorer, you can always just wait a couple hours while syncing and the old data will eventually get pushed out of the network history chart(s) automatically since it only saves the top 120 blocks by default.
I have the settings.json set to difficulty="POW" yet it still shows a difficulty for POS in the chart. I even tried using npm run reindex but it didn't fix the problem. I looked at the MongoDB and saw that in db.networkhistories a value is set for difficulty_pos for every object. The first value is equal to what the difficulty_pow should be, probably because I didn't change the difficulty until after I already ran the program a few times, but it's 0 for every subsequent object and the difficulty_pow displays the real difficulty. How can I make sure the chart doesn't show the POS difficulty? Running on Ubuntu 22.04.3 LTS