protocol / beyond-bitswap

Other
34 stars 9 forks source link

Fix IPFS memory cleanup #38

Closed hannahhoward closed 3 years ago

hannahhoward commented 3 years ago

Goals

This adds back in a corrected version of CleanDatastore for IPFS

Implementation

Rather than simply deleting all keys in the datastore, we instead unpin and then delete the DAG that starts with the RootCID, using clean IPFS APIs. It seems to work.

This also required passing the root CID into clearDatastore, which required a couple other changes