bcoin-org / bcoin

Javascript bitcoin library for node.js and browsers
https://bcoin.io
Other
3.01k stars 811 forks source link

Fix: readd old algorithm to fix progress for SPV nodes #1137

Closed bolaum closed 1 year ago

bolaum commented 1 year ago

As discussed in #1110 , there was a problem with the sync progress for SPV nodes. This PR readds the old algorithm just for SPV nodes.

masterchief164 commented 1 year ago

This PR should work fine for now. Although we will have to fix the getProgress function to use block count s and avg block generation rate to estimate the progress. Edit: On second thoughts the improvement will be negligible that way. It's fine just the way it is for now.