Fixes and improvements courtesy of Daan (black-puppydog) #6

Merged
glyph merged 13 commits from black_puppydog_fixes into main 2022-10-02 16:43:03 +00:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit 6f1536a09d - Show all commits

View File

@ -188,6 +188,12 @@ impl Database {
You'll notice in the above code snippet that we're serialising the peer data as bincode before inserting it. The sled database we're using expects values in the form of a byte vector; bincode thus provides a neat way of storing complex datastructures (such as our `Peer` `struct`).
Add the `bincode` dependency to `Cargo.toml` and then test that everything compiles correctly:
```toml
bincode = "1.3"
```
That's enough database code for the moment. Now we can return to our Scuttlebutt-related code and complete the peer subscription flows.
### Follow / Unfollow a Peer