Number of operations is per-script not per-transaction.
Reset the counter at the end of each script.
This commit is contained in:
parent
bc41004b03
commit
7b08a4e127
|
@ -413,7 +413,7 @@ func (m *Script) Step() (done bool, err error) {
|
||||||
// prepare for next instruction
|
// prepare for next instruction
|
||||||
m.scriptoff++
|
m.scriptoff++
|
||||||
if m.scriptoff >= len(m.scripts[m.scriptidx]) {
|
if m.scriptoff >= len(m.scripts[m.scriptidx]) {
|
||||||
// should only be == from checks before
|
m.numOps = 0 // number of ops is per script.
|
||||||
m.scriptoff = 0
|
m.scriptoff = 0
|
||||||
if m.scriptidx == 0 && m.bip16 {
|
if m.scriptidx == 0 && m.bip16 {
|
||||||
m.savedFirstStack = m.GetStack()
|
m.savedFirstStack = m.GetStack()
|
||||||
|
|
Loading…
Reference in a new issue