dominictarr/secure-scuttlebutt — pull request #10 by pfraze (2014-08-26 00:19:11+00:00)
Title: added unfollow()

Somewhat naive approach

If the target is refollowed, lastDB needs to have the correct seq value restored. We might create a 'lst-cache' sublevel and make the following changes:

```js
db.follow = function (other, cb) {
lastCacheDB.get(other, function(err, entry) {
if (err) return cb(err)
lastDB.put(other, (entry) ? entry.value : 0, cb)
})
}

db.unfollow = function (other, cb) {
lastCache.get(other, function(err, entry) {
if (err) return cb(err)
lastCacheDB.put(other, entry.value, function(err) {
if (err) return cb(err)
lastDB.del(other, cb)
})
})
}
```