diff --git a/beacon_chain/consensus_object_pools/consensus_manager.nim b/beacon_chain/consensus_object_pools/consensus_manager.nim index 77745fd35..e76f34d1b 100644 --- a/beacon_chain/consensus_object_pools/consensus_manager.nim +++ b/beacon_chain/consensus_object_pools/consensus_manager.nim @@ -170,7 +170,7 @@ proc updateExecutionClientHead(self: ref ConsensusManager, payloadAttributes = none attributes) # Can't use dag.head here because it hasn't been updated yet - let (payloadExecutionStatus, latestValidHash) = + let (payloadExecutionStatus, _) = case self.dag.cfg.consensusForkAtEpoch(newHead.blck.bid.slot.epoch) of ConsensusFork.Deneb: callForkchoiceUpdated(PayloadAttributesV3) @@ -369,17 +369,6 @@ proc runProposalForkchoiceUpdated*( get_randao_mix(forkyState.data, get_current_epoch(forkyState.data)).data feeRecipient = self[].getFeeRecipient( nextProposer, Opt.some(validatorIndex), nextWallSlot.epoch) - withdrawals = - if self.dag.headState.kind >= ConsensusFork.Capella: - # Head state is not eventual proposal state, but withdrawals will be - # identical within an epoch. - withState(self.dag.headState): - when consensusFork >= ConsensusFork.Capella: - Opt.some get_expected_withdrawals(forkyState.data) - else: - Opt.none(seq[Withdrawal]) - else: - Opt.none(seq[Withdrawal]) beaconHead = self.attestationPool[].getBeaconHead(self.dag.head) headBlockHash = self.dag.loadExecutionBlockHash(beaconHead.blck) diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index 1dbc3e8b5..3fe7e0fdd 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -1039,7 +1039,7 @@ proc validateBlsToExecutionChange*( if deferredCrypto.isErr(): return pool.checkedReject(deferredCrypto.error) - let (cryptoFut, sig) = deferredCrypto.get() + let (cryptoFut, _) = deferredCrypto.get() case await cryptoFut of BatchResult.Invalid: return pool.checkedReject( diff --git a/beacon_chain/gossip_processing/light_client_processor.nim b/beacon_chain/gossip_processing/light_client_processor.nim index feb42519e..385ca2ce9 100644 --- a/beacon_chain/gossip_processing/light_client_processor.nim +++ b/beacon_chain/gossip_processing/light_client_processor.nim @@ -455,7 +455,7 @@ proc addObject*( let wallTime = self.getBeaconTime() - (afterGenesis, wallSlot) = wallTime.toSlot() + (afterGenesis, _) = wallTime.toSlot() if not afterGenesis: error "Processing LC object before genesis, clock turned back?" diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index bd51f5cfc..6aaadf4a5 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -533,7 +533,7 @@ proc init*(T: type BeaconNode, taskpool = TaskPoolPtr.new(numThreads = config.numThreads) info "Threadpool started", numThreads = taskpool.numThreads - except Exception as exc: + except Exception: raise newException(Defect, "Failure in taskpool initialization.") if metadata.genesis.kind == BakedIn: diff --git a/beacon_chain/spec/forks.nim b/beacon_chain/spec/forks.nim index 0480710d8..009022358 100644 --- a/beacon_chain/spec/forks.nim +++ b/beacon_chain/spec/forks.nim @@ -805,7 +805,7 @@ template withBlck*( body of ConsensusFork.Bellatrix: const consensusFork {.inject, used.} = ConsensusFork.Bellatrix - template forkyBlck: untyped {.inject.} = x.bellatrixData + template forkyBlck: untyped {.inject, used.} = x.bellatrixData body of ConsensusFork.Capella: const consensusFork {.inject, used.} = ConsensusFork.Capella diff --git a/beacon_chain/sync/light_client_manager.nim b/beacon_chain/sync/light_client_manager.nim index 0084ed257..373bbe95c 100644 --- a/beacon_chain/sync/light_client_manager.nim +++ b/beacon_chain/sync/light_client_manager.nim @@ -279,10 +279,10 @@ proc query[E]( let didProgress = cast[Future[bool]](future).read() if didProgress and not progressFut.finished: progressFut.complete() - except CancelledError as exc: + except CancelledError: if not progressFut.finished: progressFut.cancelSoon() - except CatchableError as exc: + except CatchableError: discard finally: inc numCompleted @@ -297,7 +297,7 @@ proc query[E]( workers[i].addCallback(handleFinishedWorker) except CancelledError as exc: raise exc - except CatchableError as exc: + except CatchableError: workers[i] = newFuture[bool]() workers[i].complete(false) @@ -316,13 +316,13 @@ proc query[E]( try: await allFutures(workers[0 ..< maxCompleted]) break - except CancelledError as exc: + except CancelledError: continue while true: try: await doneFut break - except CancelledError as exc: + except CancelledError: continue if not progressFut.finished: diff --git a/tests/test_blockchain_dag.nim b/tests/test_blockchain_dag.nim index b13e6bfd3..1c83d72eb 100644 --- a/tests/test_blockchain_dag.nim +++ b/tests/test_blockchain_dag.nim @@ -1604,7 +1604,6 @@ template runShufflingTests(cfg: RuntimeConfig, numRandomTests: int) = stateEpoch = forkyState.data.get_current_epoch blckEpoch = blck.bid.slot.epoch minEpoch = min(stateEpoch, blckEpoch) - lowSlot = epoch.lowSlotForAttesterShuffling shufflingRef = dag.computeShufflingRef(forkyState, blck, epoch) mix = dag.computeRandaoMix(forkyState, dependentBsi.get.bid, epoch.lowSlotForAttesterShuffling) diff --git a/tests/test_validator_client.nim b/tests/test_validator_client.nim index c4d0f2850..229725329 100644 --- a/tests/test_validator_client.nim +++ b/tests/test_validator_client.nim @@ -413,7 +413,7 @@ suite "Validator Client test suite": ok RestJson.decode(value, T, requireAllFields = true, allowUnknownFields = true) - except SerializationError as exc: + except SerializationError: err("Serialization error") else: err("Content-Type not supported")