From cf3aabb9d3dd7554d5859b36ed290f2e031ba33a Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 10 Jun 2015 13:52:38 +0200 Subject: [PATCH] miner: update gas used after tx proc for pending block --- miner/worker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index 6114455297..bd4bc0e3cc 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -270,7 +270,6 @@ func (self *worker) wait() { func (self *worker) push() { if atomic.LoadInt32(&self.mining) == 1 { - self.current.block.Header().GasUsed = self.current.totalUsedGas self.current.block.SetRoot(self.current.state.Root()) // push new work to agents @@ -510,6 +509,8 @@ func (self *worker) commitTransactions(transactions types.Transactions) { current.tcount++ } } + + self.current.block.Header().GasUsed = self.current.totalUsedGas } func (self *worker) commitTransaction(tx *types.Transaction) error {