aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-10 19:52:38 +0800
committerobscuren <geffobscura@gmail.com>2015-06-10 19:52:38 +0800
commitcf3aabb9d3dd7554d5859b36ed290f2e031ba33a (patch)
treed7ddd68e9ce3bc3779a086d6146e2136a0b74578 /miner
parent1774c494560507735d7b616456be60874063101f (diff)
downloadgo-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar.gz
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar.bz2
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar.lz
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar.xz
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.tar.zst
go-tangerine-cf3aabb9d3dd7554d5859b36ed290f2e031ba33a.zip
miner: update gas used after tx proc for pending block
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 611445529..bd4bc0e3c 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 {