From 89418a5c34a35c88b28c18680bc249c470019d1c Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 4 May 2022 13:40:07 +0300 Subject: [PATCH] propagate gas outputs in fvm ApplyRet --- chain/vm/fvm.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/chain/vm/fvm.go b/chain/vm/fvm.go index f5c3ce7aa..381f8f285 100644 --- a/chain/vm/fvm.go +++ b/chain/vm/fvm.go @@ -14,8 +14,6 @@ import ( "github.com/filecoin-project/go-state-types/network" - "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/state" cbor "github.com/ipfs/go-ipld-cbor" @@ -349,14 +347,13 @@ func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet GasUsed: ret.GasUsed, }, GasCosts: &GasOutputs{ - // TODO: do the other optional fields eventually - BaseFeeBurn: big.Zero(), - OverEstimationBurn: big.Zero(), + BaseFeeBurn: ret.BaseFeeBurn, + OverEstimationBurn: ret.OverEstimationBurn, MinerPenalty: ret.MinerPenalty, MinerTip: ret.MinerTip, - Refund: big.Zero(), - GasRefund: 0, - GasBurned: 0, + Refund: ret.Refund, + GasRefund: ret.GasRefund, + GasBurned: ret.GasBurned, }, ActorErr: aerr, ExecutionTrace: et.ToExecutionTrace(),