holepunchto / hypercore

Hypercore is a secure, distributed append-only log.
https://docs.holepunch.to
MIT License
2.59k stars 182 forks source link

never send an invalid block request #534

Closed mafintosh closed 4 months ago

mafintosh commented 4 months ago

Really hard to encapsulate in a test case unfortunately but there is a bug where if we can a range update before a sync update, then we might request an OOB block (which crashes it atm)

This fixes the crash, but also makes sure to not send invalid requests in the first place