Updated the VM & VM tests
* Stack Error shouldn't revert to previous state * Updated VM Test tool * Added Transfer method to VM Env
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user