File-transfer small improvements
File transfer in swarm got auto-retried on error and prepared the way to restart a transfer from where it stopped, but this last feature is not yet implemented.
The idea here is, in case of failure, restart where it stopped. The steps I see to do it:
- Only deletes the file if the shasum is wrong, or if user-cancelled. Not if the socket is broken
- Pass "offset" to the file transfer protocol to restart where it stopped (and test it was correctly implemented)
- Add a new state (waiting for peers to restart) to improve the UI instead of cancelled if the user didn't cancelled the transfer.
Bonus:
- In client-qt implements "Delete file locally" as it's missing.