hypercore-protocol / hypercore-next

Hypercore 10 is an append only log with multi-writer primitives built in.
MIT License
150 stars 15 forks source link

Add `sparse` option, sans `core.contiguousByteLength` #100

Closed kasperisager closed 2 years ago

kasperisager commented 2 years ago

I have some in-progress code for maintaining core.contiguousByteLength, but it's a bit of a mess.

mafintosh commented 2 years ago

Nice, can you add a test for this?

kasperisager commented 2 years ago

@mafintosh Yes, let me just fix the ones in my stash that assume that core.contiguousByteLength actually works 😄

kasperisager commented 2 years ago

@mafintosh Now that non-sparse mode automatically starts replicating, I ended up testing both replication behaviour and core.length === core.contiguousLength in the same test case.

kasperisager commented 2 years ago

Converting to draft until #106 is further along.

mafintosh commented 2 years ago

@kasperisager can you fix the conflict?