When we checkout a new hypertrie, a new MountableHypertrie is created and a new ready listeners is attached on the feed. However, when the feed is already ready, the once callback will never be called.
Changing it to ready(cb) will make sure the callback will always be triggered.
I found the issue when investigating https://github.com/mafintosh/hyperdrive/issues/241.
When we checkout a new hypertrie, a new
MountableHypertrie
is created and a newready
listeners is attached on the feed. However, when the feed is already ready, theonce
callback will never be called.Changing it to
ready(cb)
will make sure the callback will always be triggered.