mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 13:38:35 +00:00
core: fix wrong references ordering in interop function
Broken by9f7018503a
. Almost the same problem as in01082a8988
(though it is deterministic now, just not the way the contract expects).
This commit is contained in:
parent
0e8ff558d1
commit
ced5ddbb9e
1 changed files with 7 additions and 2 deletions
|
@ -144,8 +144,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
|
||||
|
|
Loading…
Reference in a new issue