Alt stack should be purged between scripts.
Found by bitcoind negative scripts.
This commit is contained in:
parent
a5e7e9ebb6
commit
c7d5102954
1 changed files with 3 additions and 0 deletions
|
@ -628,6 +628,9 @@ func (m *Script) Step() (done bool, err error) {
|
|||
return false, StackErrMissingEndif
|
||||
}
|
||||
|
||||
// alt stack doesn't persist.
|
||||
_ = m.astack.DropN(m.astack.Depth())
|
||||
|
||||
m.numOps = 0 // number of ops is per script.
|
||||
m.scriptoff = 0
|
||||
if m.scriptidx == 0 && m.bip16 {
|
||||
|
|
Loading…
Reference in a new issue