From 23983c34acedad1727c97433e44af156aea1e5ef Mon Sep 17 00:00:00 2001 From: tersec Date: Sun, 26 Nov 2023 18:40:10 +0000 Subject: [PATCH] rm debugRaiseAssert (#5629) --- beacon_chain/spec/datatypes/base.nim | 3 --- beacon_chain/validator_client/api.nim | 18 +++++------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/beacon_chain/spec/datatypes/base.nim b/beacon_chain/spec/datatypes/base.nim index 064501772..b3d4e2467 100644 --- a/beacon_chain/spec/datatypes/base.nim +++ b/beacon_chain/spec/datatypes/base.nim @@ -1029,9 +1029,6 @@ func checkForkConsistency*(cfg: RuntimeConfig) = # won't be hit. const denebImplementationMissing* = false -#template debugRaiseAssert*(x: string) = raiseAssert x -template debugRaiseAssert*(x: string) = discard - func ofLen*[T, N](ListType: type List[T, N], n: int): ListType = if n < N: distinctBase(result).setLen(n) diff --git a/beacon_chain/validator_client/api.nim b/beacon_chain/validator_client/api.nim index f3055ea9e..d30854a93 100644 --- a/beacon_chain/validator_client/api.nim +++ b/beacon_chain/validator_client/api.nim @@ -648,8 +648,8 @@ template firstSuccessSequential*( if not(bodyFut.finished()): await bodyFut.cancelAndWait() raise exc - except CatchableError as exc: - # This case could not be happened. + except CatchableError: + # This case should not happen. ApiOperation.Failure else: try: @@ -668,7 +668,7 @@ template firstSuccessSequential*( pending.add(timerFut.cancelAndWait()) await noCancel allFutures(pending) raise exc - except CatchableError as exc: + except CatchableError: # This case should not happen. ApiOperation.Failure @@ -2344,11 +2344,7 @@ proc publishBlindedBlock*( of ConsensusFork.Capella: publishBlindedBlock(it, data.capellaData) of ConsensusFork.Deneb: - debugRaiseAssert $denebImplementationMissing & - ": validator_client/api.nim:publishBlindedBlock (1)" - let f = newFuture[RestPlainResponse]("") - f.fail(new RestError) - f + publishBlindedBlock(it, data.denebData) do: if apiResponse.isErr(): handleCommunicationError() @@ -2393,11 +2389,7 @@ proc publishBlindedBlock*( of ConsensusFork.Capella: publishBlindedBlock(it, data.capellaData) of ConsensusFork.Deneb: - debugRaiseAssert $denebImplementationMissing & - ": validator_client/api.nim:publishBlindedBlock (2)" - let f = newFuture[RestPlainResponse]("") - f.fail(new RestError) - f + publishBlindedBlock(it, data.denebData) do: if apiResponse.isErr(): handleCommunicationError()