From a034d5c42d111cee9038436a7cd642845b534000 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Mon, 11 Mar 2024 01:43:31 +0200 Subject: [PATCH] Address review comments. --- beacon_chain/validator_client/block_service.nim | 2 +- beacon_chain/validators/beacon_validators.nim | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/beacon_chain/validator_client/block_service.nim b/beacon_chain/validator_client/block_service.nim index 35ccfcd30..c5ee0d5dd 100644 --- a/beacon_chain/validator_client/block_service.nim +++ b/beacon_chain/validator_client/block_service.nim @@ -332,7 +332,7 @@ proc publishBlockV3(vc: ValidatorClientRef, currentSlot, slot: Slot, ) debug "Block produced", - block_type = "normal", + block_type = "non-blinded", block_root = shortLog(blockRoot), blck = shortLog(maybeBlock), execution_value = shortLog(maybeBlock.executionValue), diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 09911f30b..6ed4f9046 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -107,11 +107,10 @@ proc getValidator*(validators: auto, Opt.some ValidatorAndIndex(index: ValidatorIndex(idx), validator: validators[idx]) -func blockConsensusValue(r: BlockRewards): UInt256 = +func blockConsensusValue(r: BlockRewards): UInt256 {.noinit.} = # Returns value of `block-consensus-value` in Wei units. - (uint64(r.attestations) + uint64(r.sync_aggregate) + - uint64(r.proposer_slashings) + - uint64(r.attester_slashings)).u256 * 1000000000.u256 + u256(r.attestations + r.sync_aggregate + + r.proposer_slashings + r.attester_slashings) * u256(1000000000) proc addValidatorsFromWeb3Signer( node: BeaconNode, web3signerUrl: Web3SignerUrl, epoch: Epoch)