mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Start version guards for the ED loop (#2678)
This commit is contained in:
committed by
Bastian Köcher
parent
2718ed2709
commit
1c2b6b21da
@@ -66,6 +66,20 @@ pub trait SubstrateEquivocationDetectionPipeline:
|
||||
{
|
||||
/// How the `report_equivocation` call is built ?
|
||||
type ReportEquivocationCallBuilder: ReportEquivocationCallBuilder<Self>;
|
||||
|
||||
/// Add relay guards if required.
|
||||
async fn start_relay_guards(
|
||||
source_client: &Client<Self::SourceChain>,
|
||||
enable_version_guard: bool,
|
||||
) -> relay_substrate_client::Result<()> {
|
||||
if enable_version_guard {
|
||||
relay_substrate_client::guard::abort_on_spec_version_change(
|
||||
source_client.clone(),
|
||||
source_client.simple_runtime_version().await?.spec_version,
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
type FinalityProoffOf<P> = <<P as SubstrateFinalityPipeline>::FinalityEngine as Engine<
|
||||
|
||||
@@ -75,10 +75,15 @@ pub trait SubstrateFinalitySyncPipeline: BaseSubstrateFinalitySyncPipeline {
|
||||
|
||||
/// Add relay guards if required.
|
||||
async fn start_relay_guards(
|
||||
_target_client: &Client<Self::TargetChain>,
|
||||
_transaction_params: &TransactionParams<AccountKeyPairOf<Self::TargetChain>>,
|
||||
_enable_version_guard: bool,
|
||||
target_client: &Client<Self::TargetChain>,
|
||||
enable_version_guard: bool,
|
||||
) -> relay_substrate_client::Result<()> {
|
||||
if enable_version_guard {
|
||||
relay_substrate_client::guard::abort_on_spec_version_change(
|
||||
target_client.clone(),
|
||||
target_client.simple_runtime_version().await?.spec_version,
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user