mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
use max_block_proposal_slot_portion (#499)
* use max_block_proposal_slot_portion * remove patch now that Substrate PR is merged Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Generated
+268
-255
File diff suppressed because it is too large
Load Diff
@@ -110,6 +110,7 @@ where
|
||||
slot_duration: SlotDuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
block_proposal_slot_portion: SlotProportion,
|
||||
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||
) -> Self
|
||||
where
|
||||
Client: ProvideRuntimeApi<B>
|
||||
@@ -149,6 +150,7 @@ where
|
||||
keystore,
|
||||
telemetry,
|
||||
block_proposal_slot_portion,
|
||||
max_block_proposal_slot_portion,
|
||||
});
|
||||
|
||||
Self {
|
||||
@@ -253,6 +255,7 @@ pub struct BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO> {
|
||||
pub slot_duration: SlotDuration,
|
||||
pub telemetry: Option<TelemetryHandle>,
|
||||
pub block_proposal_slot_portion: SlotProportion,
|
||||
pub max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||
}
|
||||
|
||||
/// Build the [`AuraConsensus`].
|
||||
@@ -273,6 +276,7 @@ pub fn build_aura_consensus<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
|
||||
slot_duration,
|
||||
telemetry,
|
||||
block_proposal_slot_portion,
|
||||
max_block_proposal_slot_portion,
|
||||
}: BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO>,
|
||||
) -> Box<dyn ParachainConsensus<Block>>
|
||||
where
|
||||
@@ -327,6 +331,7 @@ where
|
||||
slot_duration,
|
||||
telemetry,
|
||||
block_proposal_slot_portion,
|
||||
max_block_proposal_slot_portion,
|
||||
)
|
||||
.build()
|
||||
}
|
||||
@@ -352,6 +357,7 @@ struct AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
|
||||
slot_duration: SlotDuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
block_proposal_slot_portion: SlotProportion,
|
||||
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||
}
|
||||
|
||||
impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error>
|
||||
@@ -409,6 +415,7 @@ where
|
||||
slot_duration: SlotDuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
block_proposal_slot_portion: SlotProportion,
|
||||
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||
) -> Self {
|
||||
Self {
|
||||
_phantom: PhantomData,
|
||||
@@ -425,6 +432,7 @@ where
|
||||
slot_duration,
|
||||
telemetry,
|
||||
block_proposal_slot_portion,
|
||||
max_block_proposal_slot_portion,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,6 +506,7 @@ where
|
||||
self.slot_duration,
|
||||
self.telemetry,
|
||||
self.block_proposal_slot_portion,
|
||||
self.max_block_proposal_slot_portion,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,6 +483,8 @@ pub async fn start_rococo_parachain_node(
|
||||
slot_duration,
|
||||
// We got around 500ms for proposing
|
||||
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
|
||||
// And a maximum of 750ms if slots are skipped
|
||||
max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)),
|
||||
telemetry,
|
||||
}))
|
||||
},
|
||||
@@ -899,6 +901,8 @@ where
|
||||
slot_duration,
|
||||
// We got around 500ms for proposing
|
||||
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
|
||||
// And a maximum of 750ms if slots are skipped
|
||||
max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)),
|
||||
telemetry: telemetry2,
|
||||
})
|
||||
}),
|
||||
|
||||
@@ -625,6 +625,7 @@ pub fn node_config(
|
||||
rpc_http_threads: None,
|
||||
rpc_cors: None,
|
||||
rpc_methods: Default::default(),
|
||||
rpc_max_payload: None,
|
||||
prometheus_config: None,
|
||||
telemetry_endpoints: None,
|
||||
telemetry_external_transport: None,
|
||||
|
||||
Reference in New Issue
Block a user