diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-22 01:18:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-22 01:18:19 +0800 |
commit | 7f85608f30a2e34005c8d15566849229c758c2f1 (patch) | |
tree | 7aeb9d8bdfda7ec10ea38688a96ed245028764ad /vm/context.go | |
parent | 09766d1729f7530093aec7e9acd3e5339b2c2028 (diff) | |
parent | fcacfabe1959c4aff6a63cb4e275f65328660601 (diff) | |
download | dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.gz dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.bz2 dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.lz dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.xz dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.zst dexon-7f85608f30a2e34005c8d15566849229c758c2f1.zip |
Merge branch 'conversion' into develop
Diffstat (limited to 'vm/context.go')
-rw-r--r-- | vm/context.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vm/context.go b/vm/context.go index 1c2f665a4..e73199b77 100644 --- a/vm/context.go +++ b/vm/context.go @@ -9,7 +9,7 @@ import ( type ContextRef interface { ReturnGas(*big.Int, *big.Int) - Address() []byte + Address() common.Address SetCode([]byte) } @@ -18,7 +18,7 @@ type Context struct { self ContextRef Code []byte - CodeAddr []byte + CodeAddr *common.Address value, Gas, UsedGas, Price *big.Int @@ -64,10 +64,6 @@ func (c *Context) GetRangeValue(x, size uint64) []byte { return common.RightPadBytes(c.Code[x:y], int(size)) } -func (c *Context) GetCode(x, size uint64) []byte { - return getData(c.Code, x, size) -} - func (c *Context) Return(ret []byte) []byte { // Return the remaining gas to the caller c.caller.ReturnGas(c.Gas, c.Price) @@ -100,7 +96,7 @@ func (c *Context) ReturnGas(gas, price *big.Int) { /* * Set / Get */ -func (c *Context) Address() []byte { +func (c *Context) Address() common.Address { return c.self.Address() } @@ -108,7 +104,7 @@ func (self *Context) SetCode(code []byte) { self.Code = code } -func (self *Context) SetCallCode(addr, code []byte) { +func (self *Context) SetCallCode(addr *common.Address, code []byte) { self.Code = code self.CodeAddr = addr } |