Commit graph

5 commits

Author SHA1 Message Date
Owain G. Ainsworth
421a213a4f Stop modifying the passed tx in NewScript.
The only time we need to zero out scripts is for calcScriptHash which operates
on a deep copy anyway. This should make the tx passed to us unmodified now.
2013-06-20 20:10:05 +01:00
Owain G. Ainsworth
df0c0b27d1 Factor the end-of-script error handling into a function.
Use it to reduce code dpulication in the bip16 case.

In addition we export it so that that a user could run:
for !done && err == nil {
	done, err = s.Step()
}
err = s.CheckErrorCondition()

manually instead of having to run Execute().
2013-06-18 17:44:29 +01:00
Owain G. Ainsworth
7b08a4e127 Number of operations is per-script not per-transaction.
Reset the counter at the end of each script.
2013-06-18 17:44:18 +01:00
Owain G. Ainsworth
bc41004b03 Use errors.New() not fmt.Errorf() when no fmt string. 2013-06-18 17:44:15 +01:00
Dave Collins
1197770159 Initial implementation. 2013-06-13 14:59:46 -05:00