Merge pull request #10549 from filecoin-project/asr/gas-paych-special
fix: gas estimation: don't special case paych collects
This commit is contained in:
commit
ce17546a76
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user