From 7b08a4e127a7c361287e6e55c6aad433cf2568ed Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Tue, 18 Jun 2013 17:38:18 +0100 Subject: [PATCH] Number of operations is per-script not per-transaction. Reset the counter at the end of each script. --- script.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.go b/script.go index b1bef325f..c10fdfb15 100644 --- a/script.go +++ b/script.go @@ -413,7 +413,7 @@ func (m *Script) Step() (done bool, err error) { // prepare for next instruction m.scriptoff++ 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 if m.scriptidx == 0 && m.bip16 { m.savedFirstStack = m.GetStack()