aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/asm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-17 00:25:24 +0800
committerobscuren <geffobscura@gmail.com>2014-06-17 00:25:24 +0800
commit5a0e75173626704c3d58be582dff318218569ef3 (patch)
tree801ec6d33fe21e46230a3082cd069534f64aa251 /ethchain/asm.go
parent006ac772e6c81271a84ff56e00527b2adbc0129c (diff)
parentff0f15f7634ca713b0ce8232a8fa63eec5c3fad7 (diff)
downloadgo-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar.gz
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar.bz2
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar.lz
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar.xz
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.tar.zst
go-tangerine-5a0e75173626704c3d58be582dff318218569ef3.zip
Merge branch 'release/0.5.13'
Diffstat (limited to 'ethchain/asm.go')
-rw-r--r--ethchain/asm.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/ethchain/asm.go b/ethchain/asm.go
index 430a89450..c267f9b55 100644
--- a/ethchain/asm.go
+++ b/ethchain/asm.go
@@ -25,16 +25,10 @@ func Disassemble(script []byte) (asm []string) {
pc.Add(pc, ethutil.Big1)
a := int64(op) - int64(PUSH1) + 1
data := script[pc.Int64() : pc.Int64()+a]
- val := ethutil.BigD(data)
-
- var b []byte
- if val.Int64() == 0 {
- b = []byte{0}
- } else {
- b = val.Bytes()
+ if len(data) == 0 {
+ data = []byte{0}
}
-
- asm = append(asm, fmt.Sprintf("0x%x", b))
+ asm = append(asm, fmt.Sprintf("%#x", data))
pc.Add(pc, big.NewInt(a-1))
}