Skip to content

Commit

Permalink
autopilot: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 14, 2023
1 parent aa521cc commit ab1f391
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion autopilot/contractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,6 @@ func (c *contractor) refreshContract(ctx context.Context, w Worker, ci contractI
return api.ContractMetadata{}, false, fmt.Errorf("insufficient budget: %s < %s", budget.String(), renterFunds.String())
}

// calculate the new collateral
expectedStorage := renterFundsToExpectedStorage(renterFunds, contract.EndHeight()-cs.BlockHeight, ci.priceTable)
unallocatedCollateral := rev.MissedHostPayout().Sub(contract.ContractPrice)

Expand Down
5 changes: 1 addition & 4 deletions worker/rhpv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1214,9 +1214,6 @@ func RPCRenew(ctx context.Context, rrr api.RHPRenewRequest, bus Bus, t *transpor
}
}

// Remember contract price.
contractPrice := pt.ContractPrice

// Perform gouging checks.
gc, err := GougingCheckerFromContext(ctx, false)
if err != nil {
Expand Down Expand Up @@ -1331,7 +1328,7 @@ func RPCRenew(ctx context.Context, rrr api.RHPRenewRequest, bus Bus, t *transpor
return rhpv2.ContractRevision{
Revision: noOpRevision,
Signatures: [2]types.TransactionSignature{renterNoOpRevisionSignature, hostSigs.RevisionSignature},
}, txnSet, contractPrice, nil
}, txnSet, pt.ContractPrice, nil
}

// initialRevision returns the first revision of a file contract formation
Expand Down

0 comments on commit ab1f391

Please sign in to comment.