pfraze/scuttlebot — pull request #34 by dominictarr (2014-12-04 16:21:51+00:00)
Title: Blobs (attachments) replication (tracking pull request)

This isn't quite finished yet, but adds some of what is needed for replicating blobs.

The protocol is as follows.

* user uses 'blobs.want(hash, cb)` to request a blob, if we don't already have it it is added to want list.
* when rpc connection created, ask remote if they have any wanted blobs.
* if yes, request those hashes from remote. `cb` when that hash is retrived.

there is a bit more work here around closing the rpc connection properly. The code you see here just uses a timeout to give the remote a chance to request a hash if you don't want any, but this is an ugly hack.