Recover known recoverable FileContracts
This MR adds a simple form of contract recovery to Sia. Basically if the wallet is unlocked, the contractor will recognize contracts belonging to the seed while scanning the blockchain. Afterwards it will periodically try to recover them.
- The wallet needs to be unlocked while the contractor is syncing
- There is no way to trigger a rescan of the blockchain right now for missed contracts due to a locked wallet
Add an endpoint to trigger a rescan. The rescan endpoint then tries to derive the renter key and holds on to it while rescanning the blockchain, deriving ephemeral keys as necessary. That way the wallet only needs to be unlocked when the endpoint is called. The contractor then starts a temporary subscription which only needs to save to disk if a contract is actually found.