From 367fa1a7a38cbe3f31ac83c3c6afef57ff1229df Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Fri, 22 Apr 2022 10:36:33 +0300 Subject: [PATCH] Formatting --- src/pocketdb/consensus/Base.h | 23 ++++--------------- .../repositories/web/WebRpcRepository.cpp | 18 +++++++-------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/pocketdb/consensus/Base.h b/src/pocketdb/consensus/Base.h index fdd4df84e..7dd8bca7b 100644 --- a/src/pocketdb/consensus/Base.h +++ b/src/pocketdb/consensus/Base.h @@ -333,25 +333,10 @@ namespace PocketConsensus } }, // ConsensusLimit_threshold_likers_count - { - ConsensusLimit_threshold_likers_count, - { - { - NetworkMain, - { - {0, 0}, - {1124000, 100} - } - }, - { - NetworkTest, - { - {0, 0}, - {100000, 10} - } - } - } - }, + { ConsensusLimit_threshold_likers_count, { + { NetworkMain, { {0, 0}, {1124000, 100} }}, + { NetworkTest, { {0, 0}, {100000, 10} }} + }}, { ConsensusLimit_threshold_low_likers_count, { { NetworkMain, { {0, 30} }}, { NetworkTest, { {0, 30}, {761000, 0} }} diff --git a/src/pocketdb/repositories/web/WebRpcRepository.cpp b/src/pocketdb/repositories/web/WebRpcRepository.cpp index ef9a32afd..43c985c04 100644 --- a/src/pocketdb/repositories/web/WebRpcRepository.cpp +++ b/src/pocketdb/repositories/web/WebRpcRepository.cpp @@ -274,31 +274,31 @@ namespace PocketDb ifnull((select b.Value from Balances b indexed by Balances_AddressHash_Last where b.AddressHash=u.String1 and b.Last=1),0) as Balance, - (select count(1) from Ratings r indexed by Ratings_Type_Id_Last_Height + (select count() from Ratings r indexed by Ratings_Type_Id_Last_Height where r.Type=1 and r.Id=u.Id) as Likers, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (200) and p.Hash=p.String2 and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as PostSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (201) and p.Hash=p.String2 and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as VideoSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (202) and p.Hash=p.String2 and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as ArticleSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (204) and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as CommentSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (300) and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as ScoreSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (301) and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as ScoreCommentSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (307) and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as ComplainSpent, - (select count(1) from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 + (select count() from Transactions p indexed by Transactions_Type_String1_Height_Time_Int1 where p.Type in (410) and p.String1=u.String1 and (p.Height>=? or p.Height isnull)) as FlagsSpent from Transactions u indexed by Transactions_Type_Last_String1_Height_Id