From 6343720adfff1269fd54443016dfc22a6f6ad688 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 4 Apr 2022 12:47:29 +0300 Subject: [PATCH] dao: return ErrKeyNotFound from GetAppExecResults for dummy txs Otherwise decoding error may be returned which can be misleading. --- pkg/core/dao/dao.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/dao/dao.go b/pkg/core/dao/dao.go index 5a2971c96..f7e6f065e 100644 --- a/pkg/core/dao/dao.go +++ b/pkg/core/dao/dao.go @@ -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)