holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.85k stars 136 forks source link

drive.download() does not work as expected #350

Open gmaclennan opened 1 year ago

gmaclennan commented 1 year ago

Calling await drive.download() does not download the expected data if you do not wait for the drive to update first. Currently drive.update({ wait: true }) does not work as expected either. This is possibly due to hyperbee read streams not being updated to account for the change in default behaviour of hypercore changing to updates being local only by default.

This PR adds a failing test, but I'm not sure if the fix belongs here or in hyperbee.