Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Jan 25, 2024
1 parent b6f68d0 commit 5c10acf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/beacon-node/src/chain/rewards/blockRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function computeBlockRewards(
): Promise<BlockRewards> {
const fork = preState.config.getForkName(block.slot);
const {attestations: cachedAttestationsReward = 0, syncAggregate: cachedSyncAggregateReward = 0} =
postState?.proposerRewards || {};
postState?.proposerRewards ?? {};
let blockAttestationReward = cachedAttestationsReward;
let syncAggregateReward = cachedSyncAggregateReward;

Expand Down Expand Up @@ -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");
}

/**
Expand Down

0 comments on commit 5c10acf

Please sign in to comment.