@@ -690,6 +690,10 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex
690690 totalSyncExpected := float64 (0 )
691691 totalProposals := uint32 (0 )
692692
693+ totalMissedRewardsCl := int64 (0 )
694+ totalMissedRewardsAttestations := int64 (0 )
695+ totalMissedRewardsSync := int64 (0 )
696+
693697 validatorArr := make ([]t.VDBValidator , 0 )
694698 for _ , row := range rows {
695699 validatorArr = append (validatorArr , t .VDBValidator (row .ValidatorIndex ))
@@ -705,9 +709,9 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex
705709 ret .AttestationsTarget .Success += uint64 (row .AttestationsTargetExecuted )
706710 ret .AttestationsTarget .Failed += uint64 (row .AttestationsScheduled ) - uint64 (row .AttestationsTargetExecuted )
707711
708- ret . MissedRewards . ProposerRewards . Cl += uint64 ( row .BlocksCLMissedReward )
709- ret . MissedRewards . Attestations += uint64 ( row .AttestationsIdealReward ) - uint64 ( row .AttestationsRewardRewardsOnly )
710- ret . MissedRewards . Sync += uint64 ( row .SyncLocalizedMaxRewards ) - uint64 ( row .SyncRewardRewardsOnly )
712+ totalMissedRewardsCl += row .BlocksCLMissedReward
713+ totalMissedRewardsAttestations += row .AttestationsIdealReward - row .AttestationsRewardRewardsOnly
714+ totalMissedRewardsSync += row .SyncLocalizedMaxRewards - row .SyncRewardRewardsOnly
711715
712716 if row .ValidatorIndex == 0 && row .BlocksProposed > 0 && row .BlocksProposed != row .BlocksScheduled {
713717 row .BlocksProposed -- // subtract the genesis block from validator 0 (TODO: remove when fixed in the dashoard data exporter)
@@ -756,6 +760,10 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex
756760 }
757761 }
758762
763+ ret .MissedRewards .Attestations = ret .MissedRewards .Attestations .Add (decimal .NewFromInt (totalMissedRewardsAttestations ))
764+ ret .MissedRewards .Sync = ret .MissedRewards .Sync .Add (decimal .NewFromInt (totalMissedRewardsSync ))
765+ ret .MissedRewards .ProposerRewards .Cl = ret .MissedRewards .ProposerRewards .Cl .Add (decimal .NewFromInt (totalMissedRewardsCl ))
766+
759767 _ , ret .Apr .El , _ , ret .Apr .Cl , err = d .internal_getElClAPR (ctx , dashboardId , groupId , hours )
760768 if err != nil {
761769 return nil , err
0 commit comments