From a6c306d7c11b21894872209863c095a76b5e7717 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Wed, 27 Mar 2024 13:41:45 +0100 Subject: [PATCH] worker: update maxRevisionCost check to match the way hostd computes LatestRevisionCost --- worker/gouging.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/gouging.go b/worker/gouging.go index e8e362040..38d4aa088 100644 --- a/worker/gouging.go +++ b/worker/gouging.go @@ -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) }