mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Make candidate validation timeouts configurable (#4001)
* pvf: make execution timeout configurable * guide: add timeouts to candidate validation params * add timeouts to candidate validation messages * fmt * port backing to use the backing pvf timeout * port approval-voting to use the execution timeout * port dispute participation to use the correct timeout * fmt * address grumbles & test failure
This commit is contained in:
committed by
GitHub
parent
114e757988
commit
6002865874
@@ -51,6 +51,7 @@ use polkadot_statement_table::v1::Misbehavior;
|
||||
use std::{
|
||||
collections::{BTreeMap, HashSet},
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
/// Network events as transmitted to other subsystems, wrapped in their message types.
|
||||
@@ -114,6 +115,8 @@ pub enum CandidateValidationMessage {
|
||||
ValidateFromChainState(
|
||||
CandidateDescriptor,
|
||||
Arc<PoV>,
|
||||
/// Execution timeout
|
||||
Duration,
|
||||
oneshot::Sender<Result<ValidationResult, ValidationFailed>>,
|
||||
),
|
||||
/// Validate a candidate with provided, exhaustive parameters for validation.
|
||||
@@ -130,6 +133,8 @@ pub enum CandidateValidationMessage {
|
||||
ValidationCode,
|
||||
CandidateDescriptor,
|
||||
Arc<PoV>,
|
||||
/// Execution timeout
|
||||
Duration,
|
||||
oneshot::Sender<Result<ValidationResult, ValidationFailed>>,
|
||||
),
|
||||
}
|
||||
@@ -138,8 +143,8 @@ impl CandidateValidationMessage {
|
||||
/// If the current variant contains the relay parent hash, return it.
|
||||
pub fn relay_parent(&self) -> Option<Hash> {
|
||||
match self {
|
||||
Self::ValidateFromChainState(_, _, _) => None,
|
||||
Self::ValidateFromExhaustive(_, _, _, _, _) => None,
|
||||
Self::ValidateFromChainState(_, _, _, _) => None,
|
||||
Self::ValidateFromExhaustive(_, _, _, _, _, _) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user