OSDN Git Service
(root)
/
bytom
/
bytom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add unit test (#1683)
[bytom/bytom.git]
/
protocol
/
vm
/
vmutil
/
script.go
diff --git
a/protocol/vm/vmutil/script.go
b/protocol/vm/vmutil/script.go
index
7061491
..
1f0d82f
100644
(file)
--- a/
protocol/vm/vmutil/script.go
+++ b/
protocol/vm/vmutil/script.go
@@
-141,7
+141,7
@@
func GetIssuanceProgramRestrictHeight(program []byte) (int64, error) {
return 0, err
}
return 0, err
}
- if insts[0].IsPushdata() && insts[1].Op == vm.OP_BLOCKHEIGHT && insts[2].Op == vm.OP_GREATERTHAN && insts[3].Op == vm.OP_VERIFY {
+ if
len(insts) >= 4 &&
insts[0].IsPushdata() && insts[1].Op == vm.OP_BLOCKHEIGHT && insts[2].Op == vm.OP_GREATERTHAN && insts[3].Op == vm.OP_VERIFY {
return vm.AsInt64(insts[0].Data)
}
return 0, nil
return vm.AsInt64(insts[0].Data)
}
return 0, nil