Cleaned up some of that util

This commit is contained in:
obscuren
2015-01-04 14:20:16 +01:00
parent bd0c267cbe
commit 09841b1c9b
38 changed files with 199 additions and 1825 deletions

View File

@ -38,13 +38,13 @@ func NewContext(caller ContextRef, object ContextRef, code []byte, gas, price *b
return c
}
func (c *Context) GetOp(x uint64) OpCode {
return OpCode(c.GetByte(x))
func (c *Context) GetOp(n uint64) OpCode {
return OpCode(c.GetByte(n))
}
func (c *Context) GetByte(x uint64) byte {
if x < uint64(len(c.Code)) {
return c.Code[x]
func (c *Context) GetByte(n uint64) byte {
if n < uint64(len(c.Code)) {
return c.Code[n]
}
return 0