Skip to content

invalidate editors/downloaders during renew

Luke Champine requested to merge renew-fix into master

managedRenewContracts will now mark each editor/downloader as invalid, then grab the latest revision of each contract and renew them. During renewal, attempting to create an editor or downloader will return an error. Trying to use an invalid editor/downloader will also result in an error, so the renter will just continually attempt to create editors and fail until the renewal has completed.

I'm not super happy with the locking here; a redesign is probably warranted. Specifically, the interaction between managedRenewContracts and editor.Close is ugly because Close locks the contractor. Ideally, editors/downloaders wouldn't lock the contractor at all, but that requires an alternative method of updating the contract after each revision. We can revisit this later.

Merge request reports