blowfishxyz / blocklist

Javascript library to use Blowfish blocklists locally
https://blowfish.xyz/
MIT License
11 stars 0 forks source link

feat: change `recent` in the blocklist object to recently added and recently removed #10

Closed sevazhidkov closed 1 year ago

sevazhidkov commented 1 year ago

Originally, I added recent to blocklist object that's returned from API. It was designed to be able to add new domains to the blocklist without updating (and making user re-download) whole blocklist.

However, it only allows to add new domains to blocklist. Deleting a domain from whitelist, a reasonable operation that might have to be executed urgently, would force a re-download.

I changed it to recentlyAdded and recentlyRemoved. recentlyAdded blocks domains that are not in the bloom filter. recentlyRemoved unblocks domain that are in the bloom filter.

Tests are failing expectedly, since we haven't deployed the new mock API yet.