From 57d4c98d007b761999ab7260e850e9fd96ded131 Mon Sep 17 00:00:00 2001 From: Aayush Date: Thu, 23 Mar 2023 09:50:28 -0400 Subject: [PATCH] fix: gas estimation: don't special case paych collects --- node/impl/full/gas.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/node/impl/full/gas.go b/node/impl/full/gas.go index 24e1b3fbc..5ed51248a 100644 --- a/node/impl/full/gas.go +++ b/node/impl/full/gas.go @@ -372,18 +372,6 @@ func gasEstimateGasLimit( } ret = (ret * int64(transitionalMulti*1024)) >> 10 - // Special case for PaymentChannel collect, which is deleting actor - // We ignore errors in this special case since they CAN occur, - // and we just want to detect existing payment channel actors - st, err := smgr.ParentState(ts) - if err == nil { - act, err := st.GetActor(msg.To) - if err == nil && lbuiltin.IsPaymentChannelActor(act.Code) && msgIn.Method == builtin.MethodsPaych.Collect { - // add the refunded gas for DestroyActor back into the gas used - ret += 76e3 - } - } - return ret, nil }