Skip to content

Commit

Permalink
e2e: fix TestGouging
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Mar 27, 2024
1 parent a6c306d commit aaab735
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion worker/gouging.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ func checkPriceGougingPT(gs api.GougingSettings, cs api.ConsensusState, txnFee t
}

// check LatestRevisionCost - expect sane value
maxRevisionCost := gs.MaxRPCPrice.Add(gs.MaxDownloadPrice.Div64(1 << 40).Mul64(2048))
maxRevisionCost, overflow := gs.MaxRPCPrice.AddWithOverflow(gs.MaxDownloadPrice.Div64(1 << 40).Mul64(2048))
if overflow {
maxRevisionCost = types.MaxCurrency
}
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 aaab735

Please sign in to comment.