diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-29 04:44:34 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-29 04:44:34 +0800 |
commit | 1bce02eff70db43b98d68fcd094fd2e15745b021 (patch) | |
tree | a69acb327b4f71d59b297ca778450c128dce85f8 /chain/block_manager.go | |
parent | 8cf9ed0ea588e97f2baf0f834248727e8fbca18f (diff) | |
parent | a3559c5e1b469890bb8d71e9992175febaae31c7 (diff) | |
download | dexon-1bce02eff70db43b98d68fcd094fd2e15745b021.tar.gz dexon-1bce02eff70db43b98d68fcd094fd2e15745b021.tar.zst dexon-1bce02eff70db43b98d68fcd094fd2e15745b021.zip |
Fixed merge
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()) |