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