diff options
Diffstat (limited to 'chain/block_manager.go')
-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 e652ad10e..4cc43840c 100644 --- a/chain/block_manager.go +++ b/chain/block_manager.go @@ -155,10 +155,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 := types.NewReceipt(state.Root(), cumulative) receipt.SetLogs(state.Logs()) @@ -247,7 +248,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I 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()) |