forked from TrueCloudLab/neoneo-go
core: adjust System.Blockchain.GetTransactionFromBlock interop
To match C# implementation, we should pick all arguments from stack first.
This commit is contained in:
parent
a1f98f92fe
commit
74ffde8367
1 changed files with 1 additions and 1 deletions
|
@ -155,12 +155,12 @@ func bcGetTransactionFromBlock(ic *interop.Context, v *vm.VM) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
index := v.Estack().Pop().BigInt().Int64()
|
||||
block, err := ic.DAO.GetBlock(hash)
|
||||
if err != nil || !isTraceableBlock(ic, block.Index) {
|
||||
v.Estack().PushVal(stackitem.Null{})
|
||||
return nil
|
||||
}
|
||||
index := v.Estack().Pop().BigInt().Int64()
|
||||
if index < 0 || index >= int64(len(block.Transactions)) {
|
||||
return errors.New("wrong transaction index")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue