mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Derive Clone for RelayStateSproofBuilder (#884)
This commit is contained in:
@@ -23,6 +23,7 @@ use sp_state_machine::MemoryDB;
|
|||||||
use sp_std::collections::btree_map::BTreeMap;
|
use sp_std::collections::btree_map::BTreeMap;
|
||||||
|
|
||||||
/// Builds a sproof (portmanteau of 'spoof' and 'proof') of the relay chain state.
|
/// Builds a sproof (portmanteau of 'spoof' and 'proof') of the relay chain state.
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct RelayStateSproofBuilder {
|
pub struct RelayStateSproofBuilder {
|
||||||
/// The para id of the current parachain.
|
/// The para id of the current parachain.
|
||||||
///
|
///
|
||||||
@@ -70,26 +71,6 @@ impl Default for RelayStateSproofBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: derive `Copy` and `Clone` for `UpgradeGoAhead` to avoid manual implementation.
|
|
||||||
impl Clone for RelayStateSproofBuilder {
|
|
||||||
fn clone(&self) -> Self {
|
|
||||||
RelayStateSproofBuilder {
|
|
||||||
para_id: self.para_id,
|
|
||||||
host_config: self.host_config.clone(),
|
|
||||||
dmq_mqc_head: self.dmq_mqc_head.clone(),
|
|
||||||
upgrade_go_ahead: self.upgrade_go_ahead.as_ref().map(|u| match u {
|
|
||||||
UpgradeGoAhead::Abort => UpgradeGoAhead::Abort,
|
|
||||||
UpgradeGoAhead::GoAhead => UpgradeGoAhead::GoAhead,
|
|
||||||
}),
|
|
||||||
relay_dispatch_queue_size: self.relay_dispatch_queue_size,
|
|
||||||
hrmp_ingress_channel_index: self.hrmp_ingress_channel_index.clone(),
|
|
||||||
hrmp_egress_channel_index: self.hrmp_egress_channel_index.clone(),
|
|
||||||
hrmp_channels: self.hrmp_channels.clone(),
|
|
||||||
current_slot: self.current_slot.clone(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RelayStateSproofBuilder {
|
impl RelayStateSproofBuilder {
|
||||||
/// Returns a mutable reference to HRMP channel metadata for a channel (`sender`, `self.para_id`).
|
/// Returns a mutable reference to HRMP channel metadata for a channel (`sender`, `self.para_id`).
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user