Skip to content

Commit

Permalink
worker: ignore price table gouging when syncing account
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Jul 13, 2024
1 parent 0be69bc commit cdad429
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion worker/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ func (h *host) FundAccount(ctx context.Context, balance types.Currency, rev *typ

func (h *host) SyncAccount(ctx context.Context, rev *types.FileContractRevision) error {
// fetch pricetable
pt, err := h.priceTable(ctx, rev)
// NOTE: we call 'fetch' here instead of h.priceTable to bypass the gouging
// check on the pricetable since we assume a cost of 1 hasting anyway. That
// way syncing the account balance doesn't neeedlessly fail on hosts that we
// just want to download from and therefore need to sync the account with.
pt, err := h.priceTables.fetch(ctx, h.hk, rev)
if err != nil {
return err
}
Expand Down

0 comments on commit cdad429

Please sign in to comment.