From 11dc902d53deb2e805e09ce9823383292a1cd5a3 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 30 Jun 2020 20:12:01 +0200 Subject: [PATCH] Adjust OnMethodInvocation Signed-off-by: Jakub Sztandera --- chain/vm/gas_v0.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chain/vm/gas_v0.go b/chain/vm/gas_v0.go index b0c839f2f..37eea066a 100644 --- a/chain/vm/gas_v0.go +++ b/chain/vm/gas_v0.go @@ -99,7 +99,7 @@ func (pl *pricelistV0) OnChainReturnValue(dataSize int) GasCharge { func (pl *pricelistV0) OnMethodInvocation(value abi.TokenAmount, methodNum abi.MethodNum) GasCharge { ret := pl.sendBase extra := "" - virtGas := int64(1069512) + virtGas := int64(1072944) if value != abi.NewTokenAmount(0) { // TODO: fix this, it is comparing pointers instead of values @@ -107,10 +107,10 @@ func (pl *pricelistV0) OnMethodInvocation(value abi.TokenAmount, methodNum abi.M ret += pl.sendTransferFunds } if big.Cmp(value, abi.NewTokenAmount(0)) != 0 { - virtGas += 498173 + virtGas += 497495 if methodNum == builtin.MethodSend { // transfer only - virtGas += 968198 + virtGas += 973940 } extra += "t" } @@ -118,9 +118,9 @@ func (pl *pricelistV0) OnMethodInvocation(value abi.TokenAmount, methodNum abi.M ret += pl.sendInvokeMethod extra += "i" // running actors is cheaper becase we hand over to actors - virtGas += -294632 + virtGas += -295779 } - return newGasCharge("OnMethodInvocation", ret, 0).WithVirtual(86315, 0).WithExtra(extra) + return newGasCharge("OnMethodInvocation", ret, 0).WithVirtual(virtGas, 0).WithExtra(extra) } // OnIpldGet returns the gas used for storing an object