ContractUtilities are potentially reset every time managedMarkContractsUtility is run. If we cancel the allowance or set a contract to !goodForUpload or !goodForRenew because it failed to renew too many times, we don't want managedMarkContractsUtility to reset those fields to true again.
This PR introduces the locked field that prevents those fields from being reset to true.
Note: previously we depended on threadedContractMaintenance not being run when the allowance was canceled and the renew code to setting the fields back to false right after resetting them but those are not well-known assumptions. In fact I forgot about those myself when I locked at the code a few weeks later so I think we should make stronger guarantees for those fields not to be changed.
ContractUtilities are potentially reset every time
managedMarkContractsUtility
is run. If we cancel the allowance or set a contract to!goodForUpload
or!goodForRenew
because it failed to renew too many times, we don't wantmanagedMarkContractsUtility
to reset those fields to true again. This PR introduces thelocked
field that prevents those fields from being reset totrue
.Note: previously we depended on
threadedContractMaintenance
not being run when the allowance was canceled and the renew code to setting the fields back tofalse
right after resetting them but those are not well-known assumptions. In fact I forgot about those myself when I locked at the code a few weeks later so I think we should make stronger guarantees for those fields not to be changed.