dao: return ErrKeyNotFound from GetAppExecResults for dummy txs

Otherwise decoding error may be returned which can be misleading.
This commit is contained in:
Anna Shaleva 2022-04-04 12:47:29 +03:00
parent 9a41356a3b
commit 6343720adf

View file

@ -259,6 +259,9 @@ func (dao *Simple) GetAppExecResults(hash util.Uint256, trig trigger.Type) ([]st
return nil, err
}
case storage.ExecTransaction:
if len(bs) >= 6 && bs[5] == transaction.DummyVersion {
return nil, storage.ErrKeyNotFound
}
_ = r.ReadU32LE()
tx := &transaction.Transaction{}
tx.DecodeBinary(r)