From aa23266c6f5a737e768e4ace138f0a56c54240a5 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Wed, 1 Apr 2020 21:16:16 -0700 Subject: [PATCH] use gas used in block rewards --- chain/stmgr/stmgr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/stmgr/stmgr.go b/chain/stmgr/stmgr.go index 8fe8ab00ca6..636d5af333b 100644 --- a/chain/stmgr/stmgr.go +++ b/chain/stmgr/stmgr.go @@ -172,7 +172,7 @@ func (sm *StateManager) ApplyBlocks(ctx context.Context, pstate cid.Cid, bms []B } receipts = append(receipts, &r.MessageReceipt) - gasReward = big.Add(gasReward, big.NewInt(r.GasUsed)) + gasReward = big.Add(gasReward, big.Mul(m.GasPrice, big.NewInt(r.GasUsed))) penalty = big.Add(penalty, r.Penalty) if cb != nil {