aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/asm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-06 23:43:27 +0800
committerobscuren <geffobscura@gmail.com>2014-05-06 23:43:27 +0800
commita0af7de58eeba598c8e967ae9deefb4ee287a1df (patch)
tree5ebf941f106b4827949dc1849ca12039473e4819 /ethchain/asm.go
parentaf6875f4b25145402b20e37ab037d912f54ec968 (diff)
downloadgo-tangerine-a0af7de58eeba598c8e967ae9deefb4ee287a1df.tar.gz
go-tangerine-a0af7de58eeba598c8e967ae9deefb4ee287a1df.tar.zst
go-tangerine-a0af7de58eeba598c8e967ae9deefb4ee287a1df.zip
Optimizations
Diffstat (limited to 'ethchain/asm.go')
-rw-r--r--ethchain/asm.go16
1 files changed, 1 insertions, 15 deletions
diff --git a/ethchain/asm.go b/ethchain/asm.go
index 3194549ba..d46e46af7 100644
--- a/ethchain/asm.go
+++ b/ethchain/asm.go
@@ -21,7 +21,7 @@ func Disassemble(script []byte) (asm []string) {
asm = append(asm, fmt.Sprintf("%v", op))
switch op {
- case oPUSH: // Push PC+1 on to the stack
+ case oPUSH32: // Push PC+1 on to the stack
pc.Add(pc, ethutil.Big1)
data := script[pc.Int64() : pc.Int64()+32]
val := ethutil.BigD(data)
@@ -36,20 +36,6 @@ func Disassemble(script []byte) (asm []string) {
asm = append(asm, fmt.Sprintf("0x%x", b))
pc.Add(pc, big.NewInt(31))
- case oPUSH20:
- pc.Add(pc, ethutil.Big1)
- data := script[pc.Int64() : pc.Int64()+20]
- val := ethutil.BigD(data)
- var b []byte
- if val.Int64() == 0 {
- b = []byte{0}
- } else {
- b = val.Bytes()
- }
-
- asm = append(asm, fmt.Sprintf("0x%x", b))
-
- pc.Add(pc, big.NewInt(19))
}
pc.Add(pc, ethutil.Big1)