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 `preupgrade` hook #129

Closed kasperisager closed 1 year ago

kasperisager commented 1 year ago

Closes #128

mafintosh commented 1 year ago

@kasperisager whats the preupgradeLength needed for here?

kasperisager commented 1 year ago

@mafintosh It's returned from core.length if set.

mafintosh commented 1 year ago

and we can't just use the snapshot mechanic for that always?

kasperisager commented 1 year ago

@mafintosh We can totally do that, that should simplify things a tad 👍

mafintosh commented 1 year ago

@kasperisager sorry to do this, but can you move this to hypercore-protocol/hypercore ?

kasperisager commented 1 year ago

@mafintosh No problem at all! Rebased onto latest master and moved to https://github.com/hypercore-protocol/hypercore/pull/300.