Siacoin/Sia — pull request #88 by lukechampine (2014-04-25 06:17:01+00:00)
Title: Add support for file uploads

`UploadFile()` takes a file handle, a redundancy parameter, and a slice of `QuorumSize` `Address`s. It erasure-codes the file's contents and distributes the encoded segments amongst the `Address`s. Segments are prefaced with their index number to allow for proper reconstruction.

I also fixed a nasty bug in `clientHandler()` that was causing malformed message payloads, and added some logic for the default behavior when a message is sent directly to a TCPServer (i.e. `Address.Id` == 0).