diff --git a/nym-validator-rewarder/src/rewarder/block_signing/types.rs b/nym-validator-rewarder/src/rewarder/block_signing/types.rs index 3a814b0d04..f66cae9624 100644 --- a/nym-validator-rewarder/src/rewarder/block_signing/types.rs +++ b/nym-validator-rewarder/src/rewarder/block_signing/types.rs @@ -100,7 +100,11 @@ impl EpochSigningResults { let vp: u64 = raw_results.voting_power.try_into().unwrap_or_default(); let signed: u64 = raw_results.signed_blocks.try_into().unwrap_or_default(); - let voting_power_ratio = Decimal::from_ratio(vp, total_vp_u64); + let voting_power_ratio = if raw_results.whitelisted { + Decimal::from_ratio(vp, total_vp_u64) + } else { + Decimal::zero() + }; debug_assert!(signed <= blocks_u64); let ratio_signed = Decimal::from_ratio(signed, blocks_u64); diff --git a/nym-validator-rewarder/src/rewarder/credential_issuance/types.rs b/nym-validator-rewarder/src/rewarder/credential_issuance/types.rs index 135788ff23..aac01166ff 100644 --- a/nym-validator-rewarder/src/rewarder/credential_issuance/types.rs +++ b/nym-validator-rewarder/src/rewarder/credential_issuance/types.rs @@ -163,7 +163,7 @@ impl From for CredentialIssuanceResults { let mut total_issued = 0; for operator in value.operators.values() { - // if this validator is NOT whitelisted, do not increase the total VP + // if this validator is NOT whitelisted, do not increase the total issued credentials if operator.whitelisted { let operator_issued: u32 = operator .per_epoch @@ -182,7 +182,7 @@ impl From for CredentialIssuanceResults { .operators .into_values() .map(|runner| { - let issued_ratio = if total_issued == 0 { + let issued_ratio = if total_issued == 0 || !runner.whitelisted { Decimal::zero() } else { Decimal::from_ratio(runner.issued_credentials(), total_issued)