File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,7 @@ public class AccountsData
77 public int ActiveAccounts { get ; set ; }
88 public int PublicAccounts { get ; set ; }
99 public int TotalContracts { get ; set ; }
10+ public int TotalTz4Bakers { get ; set ; }
11+ public int TotalDalBakers { get ; set ; }
1012 }
1113}
Original file line number Diff line number Diff line change @@ -609,7 +609,21 @@ async Task<AccountsData> GetAccountsData(IDbConnection db)
609609 {
610610 In = [ 1 , 2 ] ,
611611 }
612- } )
612+ } ) ,
613+ TotalTz4Bakers = await db . ExecuteScalarAsync < int > ( """
614+ SELECT COUNT(*)::integer
615+ FROM "Accounts"
616+ WHERE "Type" = 1
617+ AND "BakingPower" != 0
618+ AND ("Address" LIKE 'tz4%' OR "ConsensusAddress" IS NOT NULL AND "ConsensusAddress" LIKE 'tz4%')
619+ """ ) ,
620+ TotalDalBakers = await db . ExecuteScalarAsync < int > ( """
621+ SELECT COUNT(*)::integer
622+ FROM "Accounts"
623+ WHERE "Type" = 1
624+ AND "BakingPower" != 0
625+ AND "CompanionAddress" IS NOT NULL
626+ """ ) ,
613627 } ;
614628 }
615629
You can’t perform that action at this time.
0 commit comments