diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
commit | b5234413611ce5984292f85a01de1f56c045b490 (patch) | |
tree | e6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /cmd/evm | |
parent | 0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff) | |
download | go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.gz go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.zst go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.zip |
Moved ethutil => common
Diffstat (limited to 'cmd/evm')
-rw-r--r-- | cmd/evm/main.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 960558bb4..af15dd4d4 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -33,7 +33,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" @@ -63,13 +63,13 @@ func main() { statedb := state.New(nil, db) sender := statedb.NewStateObject([]byte("sender")) receiver := statedb.NewStateObject([]byte("receiver")) - receiver.SetCode(ethutil.Hex2Bytes(*code)) + receiver.SetCode(common.Hex2Bytes(*code)) - vmenv := NewEnv(statedb, []byte("evmuser"), ethutil.Big(*value)) + vmenv := NewEnv(statedb, []byte("evmuser"), common.Big(*value)) tstart := time.Now() - ret, e := vmenv.Call(sender, receiver.Address(), ethutil.Hex2Bytes(*data), ethutil.Big(*gas), ethutil.Big(*price), ethutil.Big(*value)) + ret, e := vmenv.Call(sender, receiver.Address(), common.Hex2Bytes(*data), common.Big(*gas), common.Big(*price), common.Big(*value)) logger.Flush() if e != nil { @@ -117,11 +117,11 @@ func NewEnv(state *state.StateDB, transactor []byte, value *big.Int) *VMEnv { func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Origin() []byte { return self.transactor } -func (self *VMEnv) BlockNumber() *big.Int { return ethutil.Big0 } +func (self *VMEnv) BlockNumber() *big.Int { return common.Big0 } func (self *VMEnv) PrevHash() []byte { return make([]byte, 32) } func (self *VMEnv) Coinbase() []byte { return self.transactor } func (self *VMEnv) Time() int64 { return self.time } -func (self *VMEnv) Difficulty() *big.Int { return ethutil.Big1 } +func (self *VMEnv) Difficulty() *big.Int { return common.Big1 } func (self *VMEnv) BlockHash() []byte { return make([]byte, 32) } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) GasLimit() *big.Int { return big.NewInt(1000000000) } |