ssbc / ssb-blobs

blob gossiping ssb-subprotocol
MIT License
12 stars 11 forks source link

push persistence #39

Closed mixmix closed 3 years ago

mixmix commented 3 years ago

Problem: with Ahau we saw that sometimes when a person started offline and later connected to their first pub, sometimes their blobs just did not come through.

Solution : What I saw was that there was a db which was recording things to push, but this db wasn't being loaded into memory after restarts. This PR adds a test for that and solves it.

(In the process I did a lot of refactoring to make the code tidier - by my definition - and easier to read / maintain. I've done a lot of different PRs to remove those non-functional changes from this PR. There's still a couple of tidying things in here but hopefully it's fine)

Files which are important:

Commit history:

mixmix commented 3 years ago

Squashed and preparing to merge