janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.5k stars 1.11k forks source link

explorer needs restart to correct the current difficulty percentage #444

Closed jsarenik closed 2 years ago

jsarenik commented 2 years ago

Describe the bug

Just describing what I noticed, no ideas for a fix yet (other than restarting the btc-rpc-explorer).

After the difficulty change to period 365, I see The current difficulty is --4.89% lower than the All-Time High., a double dash (minus) sign there. And it is exactly the percentage by which the current difficulty was raised compared to previous (which was also ATH).

On my Bitcoin Explorer, it was enough to restart it. No change in code. After the restart it shows everything correctly: https://be.anyone.eu.org/

difficulty-bad

jsarenik commented 2 years ago

After restart (on https://be.anyone.eu.org/) it looks like this:

difficulty-good

janoside commented 2 years ago

Thanks for reporting. Fixed in 48df5b5a925006ca60e5231a7d08a2ece80226d5