diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-14 17:48:52 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-14 17:48:52 +0800 |
commit | c5bd32b0ad1a3d0fd20a3d1014cc8a97d889dc28 (patch) | |
tree | 5588276a932ac88daaaf9ca1858106ba3ff007b1 /ethvm/environment.go | |
parent | 2e894b668a2bde3eb83418cfd9128f3a571e0026 (diff) | |
download | go-tangerine-c5bd32b0ad1a3d0fd20a3d1014cc8a97d889dc28.tar.gz go-tangerine-c5bd32b0ad1a3d0fd20a3d1014cc8a97d889dc28.tar.zst go-tangerine-c5bd32b0ad1a3d0fd20a3d1014cc8a97d889dc28.zip |
Refactored VM to two separate VMs; std & debug
Standard VM should be about 10x faster than the debug VM. Some error
checking has been removed, all of the log statements and therefor quite
some unnecessary if-statements.
Diffstat (limited to 'ethvm/environment.go')
-rw-r--r-- | ethvm/environment.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ethvm/environment.go b/ethvm/environment.go new file mode 100644 index 000000000..e261f8462 --- /dev/null +++ b/ethvm/environment.go @@ -0,0 +1,26 @@ +package ethvm + +import ( + "math/big" + + "github.com/ethereum/eth-go/ethstate" + "github.com/ethereum/eth-go/ethutil" +) + +type Environment interface { + State() *ethstate.State + + Origin() []byte + BlockNumber() *big.Int + PrevHash() []byte + Coinbase() []byte + Time() int64 + Difficulty() *big.Int + Value() *big.Int + BlockHash() []byte +} + +type Object interface { + GetStorage(key *big.Int) *ethutil.Value + SetStorage(key *big.Int, value *ethutil.Value) +} |