Closed LuKks closed 1 year ago
This will be very welcome.
The behaviour of drive.get(path)
though might need some more explanation. Currently the docs say:
If no blob exists at path, returns null.
However as I understand from testing, there are two other scenarios:
null
I'm not sure what the best behaviour is, e.g. when should it throw and when should it return null? Currently throwing because one core has not downloaded, but returning null for the other, does seem a bit confusing.
Should also pass options to the hyperbee, via https://github.com/holepunchto/hyperdrive-next/blob/master/index.js#L182, since otherwise drive.get() can still hang if the hyperbee has not downloaded yet (just discovered this after some extensive debugging!)
Tests are not passing as I said on the PR description, it depends on the other one first.
And it also depends on: https://github.com/holepunchto/hypercore/pull/359
@mafintosh Ready!
@gmaclennan Feedback highly appreciated! If you would like to confirm the behaviour about null
vs Block not available
, currently it mostly return null
where it makes sense, let me know!
Depends on https://github.com/holepunchto/hyperblobs/pull/12 and https://github.com/holepunchto/hypercore/pull/359