rm debugRaiseAssert (#5629)

This commit is contained in:
tersec 2023-11-26 18:40:10 +00:00 committed by GitHub
parent 925d531884
commit 23983c34ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 16 deletions

View File

@ -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)

View File

@ -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()