diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-03 20:52:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-03 20:52:13 +0800 |
commit | 6212175be3a5a06099413f4a393df316c5be5752 (patch) | |
tree | b6630fc96a4e53f30dfcba2d2dfcd0c481582540 /vm/environment.go | |
parent | 6095edac5843aa18e389ef2deaa49fe05b7fcfb9 (diff) | |
download | dexon-6212175be3a5a06099413f4a393df316c5be5752.tar dexon-6212175be3a5a06099413f4a393df316c5be5752.tar.gz dexon-6212175be3a5a06099413f4a393df316c5be5752.tar.bz2 dexon-6212175be3a5a06099413f4a393df316c5be5752.tar.lz dexon-6212175be3a5a06099413f4a393df316c5be5752.tar.xz dexon-6212175be3a5a06099413f4a393df316c5be5752.tar.zst dexon-6212175be3a5a06099413f4a393df316c5be5752.zip |
reverted vm back
Diffstat (limited to 'vm/environment.go')
-rw-r--r-- | vm/environment.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/vm/environment.go b/vm/environment.go index bf773b5d6..5604989e1 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -5,10 +5,11 @@ import ( "math/big" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/state" ) type Environment interface { - //State() *state.State + State() *state.State Origin() []byte BlockNumber() *big.Int @@ -18,16 +19,8 @@ type Environment interface { Difficulty() *big.Int BlockHash() []byte GasLimit() *big.Int - Transfer(from, to Account, amount *big.Int) error - AddLog(addr []byte, topics [][]byte, data []byte) - DeleteAccount(addr []byte) - SetState(addr, key, value []byte) - GetState(addr, key []byte) []byte - Balance(addr []byte) *big.Int - AddBalance(addr []byte, balance *big.Int) - GetCode(addr []byte) []byte - Refund(addr []byte, gas, price *big.Int) + AddLog(*state.Log) } type Object interface { @@ -50,5 +43,9 @@ func Transfer(from, to Account, amount *big.Int) error { from.SubBalance(amount) to.AddBalance(amount) + // Add default LOG. Default = big(sender.addr) + 1 + //addr := ethutil.BigD(receiver.Address()) + //tx.addLog(vm.Log{sender.Address(), [][]byte{ethutil.U256(addr.Add(addr, ethutil.Big1)).Bytes()}, nil}) + return nil } |