hypercore-protocol / corestore-next

Easily manage storage/replication for large collections of Hypercores
10 stars 7 forks source link

test(encryption): tests for two edge cases opening an encrypted core #17

Closed Nuhvi closed 2 years ago

Nuhvi commented 2 years ago

Add tests for two edge cases where opening a Hypercore with encryptionKey fails to create core.encryption

1- opening a Hypercore from storage, while it was opened through discovery first without encryptionKey

2- opening an encrypted core, and an earilier session is being opened but not awaited

Both cases can be solved in core._openFromExisting

This PR will fail until Hypercore next is patched