From 29b8a0bc5ffa7a674a06a211e1c8bdd1b6ed07b1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 23 Oct 2014 01:01:26 +0200 Subject: Updated the VM & VM tests * Stack Error shouldn't revert to previous state * Updated VM Test tool * Added Transfer method to VM Env --- ethpipe/js_pipe.go | 2 +- ethpipe/vm_env.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'ethpipe') diff --git a/ethpipe/js_pipe.go b/ethpipe/js_pipe.go index 873373b75..7eb33b4ea 100644 --- a/ethpipe/js_pipe.go +++ b/ethpipe/js_pipe.go @@ -98,7 +98,7 @@ func (self *JSPipe) StorageAt(addr, storageAddr string) string { } func (self *JSPipe) BalanceAt(addr string) string { - return self.World().SafeGet(ethutil.Hex2Bytes(addr)).Balance.String() + return self.World().SafeGet(ethutil.Hex2Bytes(addr)).Balance().String() } func (self *JSPipe) TxCountAt(address string) int { diff --git a/ethpipe/vm_env.go b/ethpipe/vm_env.go index 10ce0e561..7ef335800 100644 --- a/ethpipe/vm_env.go +++ b/ethpipe/vm_env.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethstate" + "github.com/ethereum/eth-go/vm" ) type VMEnv struct { @@ -33,3 +34,6 @@ func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) State() *ethstate.State { return self.state } func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } +func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { + return vm.Transfer(from, to, amount) +} -- cgit