jhoenicke / mempool

Bitcoin Mempool Statistics
GNU Affero General Public License v3.0
334 stars 92 forks source link

.js files always have a single line, is the code up to date? #45

Closed gustavocoding closed 3 years ago

gustavocoding commented 4 years ago

The updatedata.sh script keeps updating all .js files but instead of appending data points to it, it always keeps a single value, replacing them every minute when the crontab runs (the Mysql table is increased one record per minute though). Is this behaviour expected?

gustavocoding commented 4 years ago

It seems this commit https://github.com/jhoenicke/mempool/commit/ceaff66bbb894225bb82be35557a141dbcd2f1df caused the issue, before that, every minute a new data point is added to 2h.js and others

jhoenicke commented 4 years ago

The problem is that the script now always removes the first data point and adds one new. So there is currently a bootstrapping problem, if initially you don't have enough data points. If you remove the temporary directory $DESTDIR (but keep mempool.log) and run the script again, it should recreate all js files with the right number of data points. Provided there are enough data points in mempool.log.