Closed TimDaub closed 1 year ago
Hi! Thank you for reporting this. In fact the seed is correctly exported but badly imported...
https://github.com/Callidon/bloom-filters/blob/b4ca772e810027d8777bc097340599c0b7884567/src/cuckoo/cuckoo-filter.ts#L99
Note the json.seed
instead of json._seed
.
This has been merged and deployed. Here is the new version:
This code imports the cuckoo filter to the localStorage in v3.0.0, but upon importing it again from localStorage, it'll find that the default seed wasn't serialized, and so it'll throw an error https://github.com/Callidon/bloom-filters/blob/b4ca772e810027d8777bc097340599c0b7884567/src/cuckoo/cuckoo-filter.ts#L74
however, after adding a custom seed manually, the seed gets exported as JSON and the problem is resolved
still, I think this should also work with the default seed, shouldn't it?