Host Pools
check those lengthy commit messages! woo
This diff is hilariously useless, but the gist of it is that repair.go
underwent some serious refactoring to make optimization easier. (Note how easy it would be to spawn multiple r.threadedRepairFile
goroutines.)
Some unused code got tossed out, specifically code related to replacing expiring contracts and checking for offline hosts. We'll be adding a new "refresh contract" RPC to the host soon, so I figure that will be a good time to reevaluate how auto-renewing should be managed. At this stage, the HostDB is still making per-file contracts, so renewing an individual file is pretty straightforward. But this will change once the HostDB migrates to long-term host relationships, so things can get tricky.
Good news: as of this PR, chunks should finally be distributed "properly" across hosts. That is, hosts should never receive more than one piece of each chunk.