no timeout for purely local async slashing protection and signing (#4751)

This commit is contained in:
tersec 2023-03-23 14:51:55 +00:00 committed by GitHub
parent 7892aaf08b
commit 69bc9bcd85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 5 deletions

View File

@ -702,12 +702,19 @@ proc proposeBlockMEV[
let (executionPayloadHeader, forkedBlck) = blindedBlockParts.get
# This is only substantively asynchronous with a remote key signer
let blindedBlock = awaitWithTimeout(
getBlindedBeaconBlock[SBBB](
let blindedBlock =
case validator.kind
of ValidatorKind.Local:
await getBlindedBeaconBlock[SBBB](
node, slot, validator, validator_index, forkedBlck,
executionPayloadHeader),
500.milliseconds):
Result[SBBB, string].err("getBlindedBlock timed out")
executionPayloadHeader)
of ValidatorKind.Remote:
awaitWithTimeout(
getBlindedBeaconBlock[SBBB](
node, slot, validator, validator_index, forkedBlck,
executionPayloadHeader),
1.seconds):
Result[SBBB, string].err("getBlindedBlock timed out")
if blindedBlock.isErr:
info "proposeBlockMEV: getBlindedBeaconBlock failed",