Skip to content

Commit

Permalink
worker: update maxRevisionCost check to match the way hostd computes …
Browse files Browse the repository at this point in the history
…LatestRevisionCost
  • Loading branch information
ChrisSchinnerl committed Mar 27, 2024
1 parent 83c9369 commit a6c306d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/gouging.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func checkPriceGougingPT(gs api.GougingSettings, cs api.ConsensusState, txnFee t
}

// check LatestRevisionCost - expect sane value
maxRevisionCost := gs.MaxDownloadPrice.Div64(1 << 40).Mul64(4096)
maxRevisionCost := gs.MaxRPCPrice.Add(gs.MaxDownloadPrice.Div64(1 << 40).Mul64(2048))
if pt.LatestRevisionCost.Cmp(maxRevisionCost) > 0 {
return fmt.Errorf("LatestRevisionCost of %v exceeds maximum cost of %v", pt.LatestRevisionCost, maxRevisionCost)
}
Expand Down

0 comments on commit a6c306d

Please sign in to comment.