diff --git a/src/pocketdb/repositories/ChainRepository.cpp b/src/pocketdb/repositories/ChainRepository.cpp index d48ae9d40..bdf136029 100644 --- a/src/pocketdb/repositories/ChainRepository.cpp +++ b/src/pocketdb/repositories/ChainRepository.cpp @@ -699,14 +699,8 @@ namespace PocketDb --and ut.String1 = b.String2 and ut.String1 in (select b.String2 union select value from json_each(b.String3)) and ut.Height > 0 - where b.Type in (305) - -- and b.Last = 1 + where b.Type in (306) and b.Height >= ? - and not exists (select 1 from Transactions bc indexed by Transactions_Type_Last_String1_String2_Height - where bc.Type in (306) and bc.Last = 1 and bc.String1 = b.String1 - and bc.String2 in (select b.String2 union select value from json_each(b.String3)) - and bc.Height > 0 - and bc.Id >= b.Id) and not exists (select 1 from BlockingLists bl where bl.IdSource = us.Id and bl.IdTarget = ut.Id) )sql"); TryBindStatementInt(insListStmt, 1, height);