aboutsummaryrefslogtreecommitdiffstats
path: root/chain/block_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-29 04:20:32 +0800
committerobscuren <geffobscura@gmail.com>2014-11-29 04:20:32 +0800
commitc8d0f8adc5145f650ced3ad5c8c008eb4b4094e2 (patch)
tree4fb17293fb424ddc319858907c76a065d31671f7 /chain/block_manager.go
parent6ba8328077e0ccce4e2631fc83098a3e4e54a42d (diff)
downloadgo-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar.gz
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar.bz2
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar.lz
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar.xz
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.tar.zst
go-tangerine-c8d0f8adc5145f650ced3ad5c8c008eb4b4094e2.zip
Changed refund
Diffstat (limited to 'chain/block_manager.go')
-rw-r--r--chain/block_manager.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/chain/block_manager.go b/chain/block_manager.go
index efe9e0862..fdb221cc3 100644
--- a/chain/block_manager.go
+++ b/chain/block_manager.go
@@ -154,10 +154,11 @@ done:
}
}
+ txGas.Sub(txGas, st.gas)
+
// Update the state with pending changes
- state.Update()
+ state.Update(txGas)
- txGas.Sub(txGas, st.gas)
cumulative := new(big.Int).Set(totalUsedGas.Add(totalUsedGas, txGas))
receipt := &Receipt{ethutil.CopyBytes(state.Root()), cumulative, nil /*bloom*/, state.Logs()}
receipt.Bloom = CreateBloom(Receipts{receipt})
@@ -245,7 +246,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
return
}
- state.Update()
+ state.Update(nil)
if !block.State().Cmp(state) {
err = fmt.Errorf("invalid merkle root. received=%x got=%x", block.Root(), state.Root())