aboutsummaryrefslogtreecommitdiffstats
path: root/vm/common.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-19 22:07:33 +0800
committerobscuren <geffobscura@gmail.com>2015-03-19 22:07:33 +0800
commit554f20930abba7e55fb0dd2718a00c4bd066c973 (patch)
tree41ba92fa976a28547e4e7e43f7e80a4a4f680685 /vm/common.go
parent8b20c3cc976a149c64ef0ac2cabbe49e93ba739d (diff)
parenta756dbeb7b1027eb91130ecf8d5440dca8e738d8 (diff)
downloaddexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar.gz
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar.bz2
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar.lz
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar.xz
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.tar.zst
dexon-554f20930abba7e55fb0dd2718a00c4bd066c973.zip
Merge branch 'develop' into rpcfrontier
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))
}