From 5c10acfb7fc7443ea5bd99597b3ff15083c03a8c Mon Sep 17 00:00:00 2001 From: Cayman Date: Thu, 25 Jan 2024 12:10:45 -0500 Subject: [PATCH] Apply suggestions from code review --- packages/beacon-node/src/chain/rewards/blockRewards.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/beacon-node/src/chain/rewards/blockRewards.ts b/packages/beacon-node/src/chain/rewards/blockRewards.ts index 54b7ad63a91c..7fdfe126e122 100644 --- a/packages/beacon-node/src/chain/rewards/blockRewards.ts +++ b/packages/beacon-node/src/chain/rewards/blockRewards.ts @@ -27,7 +27,7 @@ export async function computeBlockRewards( ): Promise { const fork = preState.config.getForkName(block.slot); const {attestations: cachedAttestationsReward = 0, syncAggregate: cachedSyncAggregateReward = 0} = - postState?.proposerRewards || {}; + postState?.proposerRewards ?? {}; let blockAttestationReward = cachedAttestationsReward; let syncAggregateReward = cachedSyncAggregateReward; @@ -65,7 +65,7 @@ function computeBlockAttestationRewardPhase0( _block: phase0.BeaconBlock, _preState: CachedBeaconStatePhase0 ): SubRewardValue { - throw new Error("Unsupported fork! Block attestation reward calculation is not yet available in phase0"); + throw new Error("Unsupported fork! Block attestation reward calculation is not available in phase0"); } /**