The contractor persistence is not written atomically as there is an edge case of when the disk is full both contractor.json and contractor.json_temp stop writing mid file causing an error on start up.
unable to read persisted json object from disk: invalid character '{' after top-level value
The files have to be deleted which then cause a secondary error of:
panic: renewed should never miss an id
Which is cause by the renter still being persisted, so when threadedUploadLoop starts checking files and hosts, it can't find the hosts associated with the files because that information was stored in the contractor persistence.
The contractor persistence is not written atomically as there is an edge case of when the disk is full both
contractor.json
andcontractor.json_temp
stop writing mid file causing an error on start up.unable to read persisted json object from disk: invalid character '{' after top-level value
The files have to be deleted which then cause a secondary error of:
panic: renewed should never miss an id
Which is cause by the renter still being persisted, so when
threadedUploadLoop
starts checking files and hosts, it can't find the hosts associated with the files because that information was stored in the contractor persistence.