Added a subscriber for 'verify' event with a debounce of 250ms that checks the bitfield to see if all the pieces have been downloaded. There's a bit of math and bitwise magic involved.
Once the download is complete a 'complete' event is emitted and the tracker is notified.
This should address #48 and #109.
Added a subscriber for
'verify'
event with a debounce of 250ms that checks the bitfield to see if all the pieces have been downloaded. There's a bit of math and bitwise magic involved.Once the download is complete a
'complete'
event is emitted and the tracker is notified.