renterd icon indicating copy to clipboard operation
renterd copied to clipboard

Adjust cost calc. when pruning contracts with old hosts.

Open peterjan opened this issue 9 months ago • 1 comments

This PR fixes a pruning error I ran into on my node (2 hosts actually) where we would not transfer sufficient funds to the host when pruning the contract. The numbers didn't make sense, because calculating backwards I would have to be dealing with 40TiB contracts to arrive at the expected cost. I then realised we probably updated the logic at one point and found we did in host v0.2.1... So we're just dealing with very old hosts.

The fix is to simply retry and use the old cost calc. method, it's however slightly annoying to do because the host blows up the transport on error, and we need to run into the error once because hosts didn't have a release field... I tested this manually on the integrity node.

peterjan avatar May 14 '24 20:05 peterjan