aboutsummaryrefslogtreecommitdiffstats
path: root/vm/common.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-19 21:31:14 +0800
committerobscuren <geffobscura@gmail.com>2015-03-19 21:31:14 +0800
commitcf45b939a098c9421092226d5c76dbce34eb2dda (patch)
tree2a57c4880feff1f0ff98ec505998dbb1643db1b0 /vm/common.go
parentd7ab716eea1d1892e3358b1dece6b0e2cd31fce8 (diff)
downloaddexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar.gz
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar.bz2
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar.lz
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar.xz
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.tar.zst
dexon-cf45b939a098c9421092226d5c76dbce34eb2dda.zip
fixed tests
Diffstat (limited to 'vm/common.go')
-rw-r--r--vm/common.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm/common.go b/vm/common.go
index 1f07ec8a2..90c3361de 100644
--- a/vm/common.go
+++ b/vm/common.go
@@ -119,9 +119,9 @@ func toValue(val *big.Int) interface{} {
return val
}
-func getCode(code []byte, start, size uint64) []byte {
- x := uint64(math.Min(float64(start), float64(len(code))))
- y := uint64(math.Min(float64(x+size), float64(len(code))))
+func getData(data []byte, start, size uint64) []byte {
+ x := uint64(math.Min(float64(start), float64(len(data))))
+ y := uint64(math.Min(float64(x+size), float64(len(data))))
- return common.RightPadBytes(code[x:y], int(size))
+ return common.RightPadBytes(data[x:y], int(size))
}