forked from TrueCloudLab/neoneo-go
core: fix nondeterministic txGetReferences() behavior
Ranging over map is nondeterministic and contracts may be unprepared for that. Fixes #454.
This commit is contained in:
parent
5e8122bfac
commit
01082a8988
1 changed files with 2 additions and 2 deletions
|
@ -144,8 +144,8 @@ func (ic *interopContext) txGetReferences(v *vm.VM) error {
|
|||
}
|
||||
|
||||
stackrefs := make([]vm.StackItem, 0, len(refs))
|
||||
for k, v := range refs {
|
||||
tio := txInOut{k, *v}
|
||||
for _, k := range tx.Inputs {
|
||||
tio := txInOut{*k, *refs[*k]}
|
||||
stackrefs = append(stackrefs, vm.NewInteropItem(tio))
|
||||
}
|
||||
v.Estack().PushVal(stackrefs)
|
||||
|
|
Loading…
Reference in a new issue