Merge pull request #733 from nspcc-dev/fix-getreferences-interop-regression

Fix GetReferences interop regression
This commit is contained in:
Roman Khimov 2020-03-10 10:27:36 +03:00 committed by GitHub
commit ee57b96566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,8 +146,13 @@ func (ic *interopContext) txGetReferences(v *vm.VM) error {
}
stackrefs := make([]vm.StackItem, 0, len(refs))
for _, tio := range refs {
stackrefs = append(stackrefs, vm.NewInteropItem(tio))
for i := range tx.Inputs {
for j := range refs {
if refs[j].In == tx.Inputs[i] {
stackrefs = append(stackrefs, vm.NewInteropItem(refs[j]))
break
}
}
}
v.Estack().PushVal(stackrefs)
return nil