aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-02 05:58:26 +0800
committerobscuren <geffobscura@gmail.com>2015-04-02 05:58:26 +0800
commitb8124ec79182dbf90b28c8527f2440cea6473f1b (patch)
treee5c14f90203a9b2a1d37cff28f92918b2ed54398
parent219d94c1ddcb1e1e8a3fbfcfdcb545e6271dd5be (diff)
downloaddexon-b8124ec79182dbf90b28c8527f2440cea6473f1b.tar.gz
dexon-b8124ec79182dbf90b28c8527f2440cea6473f1b.tar.zst
dexon-b8124ec79182dbf90b28c8527f2440cea6473f1b.zip
Removed old (unused) argument
-rw-r--r--core/block_processor.go4
-rw-r--r--core/chain_makers.go4
-rw-r--r--core/state/state_test.go2
-rw-r--r--core/state/statedb.go2
-rw-r--r--miner/worker.go2
-rw-r--r--tests/blocktest.go2
-rw-r--r--tests/helper/vm.go2
7 files changed, 9 insertions, 9 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index 0591fd26e..97c885536 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -84,7 +84,7 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
}
// Update the state with pending changes
- statedb.Update(nil)
+ statedb.Update()
cumulative := new(big.Int).Set(usedGas.Add(usedGas, gas))
receipt := types.NewReceipt(statedb.Root().Bytes(), cumulative)
@@ -220,7 +220,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (td *big
// Commit state objects/accounts to a temporary trie (does not save)
// used to calculate the state root.
- state.Update(common.Big0)
+ state.Update()
if header.Root != state.Root() {
err = fmt.Errorf("invalid merkle root. received=%x got=%x", header.Root, state.Root())
return
diff --git a/core/chain_makers.go b/core/chain_makers.go
index d559b2a3a..52cb367c5 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -5,10 +5,10 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/pow"
- "github.com/ethereum/go-ethereum/core/state"
)
// So we can generate blocks easily
@@ -81,7 +81,7 @@ func makeBlock(bman *BlockProcessor, parent *types.Block, i int, db common.Datab
cbase := state.GetOrNewStateObject(addr)
cbase.SetGasPool(CalcGasLimit(parent, block))
cbase.AddBalance(BlockReward)
- state.Update(common.Big0)
+ state.Update()
block.SetRoot(state.Root())
return block
}
diff --git a/core/state/state_test.go b/core/state/state_test.go
index da597d773..09a65de54 100644
--- a/core/state/state_test.go
+++ b/core/state/state_test.go
@@ -72,7 +72,7 @@ func TestNull(t *testing.T) {
//value := common.FromHex("0x823140710bf13990e4500136726d8b55")
value := make([]byte, 16)
state.SetState(address, common.Hash{}, value)
- state.Update(nil)
+ state.Update()
state.Sync()
value = state.GetState(address, common.Hash{})
}
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 2dc8239ef..e69bb34fe 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -316,7 +316,7 @@ func (self *StateDB) Refunds() map[string]*big.Int {
return self.refund
}
-func (self *StateDB) Update(gasUsed *big.Int) {
+func (self *StateDB) Update() {
self.refund = make(map[string]*big.Int)
for _, stateObject := range self.stateObjects {
diff --git a/miner/worker.go b/miner/worker.go
index d89519fb1..2ba3faed8 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -272,7 +272,7 @@ gasLimit:
core.AccumulateRewards(self.current.state, self.current.block)
- self.current.state.Update(common.Big0)
+ self.current.state.Update()
self.push()
}
diff --git a/tests/blocktest.go b/tests/blocktest.go
index fc62eda58..1c4f1c2f2 100644
--- a/tests/blocktest.go
+++ b/tests/blocktest.go
@@ -114,7 +114,7 @@ func (t *BlockTest) InsertPreState(db common.Database) (*state.StateDB, error) {
}
}
// sync objects to trie
- statedb.Update(nil)
+ statedb.Update()
// sync trie to disk
statedb.Sync()
diff --git a/tests/helper/vm.go b/tests/helper/vm.go
index 052ad6a6e..9f62ada95 100644
--- a/tests/helper/vm.go
+++ b/tests/helper/vm.go
@@ -185,7 +185,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
if core.IsNonceErr(err) || core.IsInvalidTxErr(err) {
statedb.Set(snapshot)
}
- statedb.Update(vmenv.Gas)
+ statedb.Update()
return ret, vmenv.logs, vmenv.Gas, err
}