diff options
Diffstat (limited to 'chain')
-rw-r--r-- | chain/block_manager.go | 7 |
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()) |