mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
cargo +nightly fmt (#3540)
* cargo +nightly fmt * add cargo-fmt check to ci * update ci * fmt * fmt * skip macro * ignore bridges
This commit is contained in:
@@ -26,12 +26,9 @@
|
||||
|
||||
use futures::{select, FutureExt};
|
||||
use polkadot_node_subsystem::{
|
||||
overseer::Handle,
|
||||
messages::ProvisionerMessage, errors::SubsystemError,
|
||||
};
|
||||
use polkadot_primitives::v1::{
|
||||
Block, Hash, InherentData as ParachainsInherentData,
|
||||
errors::SubsystemError, messages::ProvisionerMessage, overseer::Handle,
|
||||
};
|
||||
use polkadot_primitives::v1::{Block, Hash, InherentData as ParachainsInherentData};
|
||||
use sp_blockchain::HeaderBackend;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use std::time;
|
||||
@@ -54,13 +51,18 @@ impl ParachainsInherentDataProvider {
|
||||
let pid = async {
|
||||
let (sender, receiver) = futures::channel::oneshot::channel();
|
||||
overseer.wait_for_activation(parent, sender).await;
|
||||
receiver.await.map_err(|_| Error::ClosedChannelAwaitingActivation)?.map_err(|e| Error::Subsystem(e))?;
|
||||
receiver
|
||||
.await
|
||||
.map_err(|_| Error::ClosedChannelAwaitingActivation)?
|
||||
.map_err(|e| Error::Subsystem(e))?;
|
||||
|
||||
let (sender, receiver) = futures::channel::oneshot::channel();
|
||||
overseer.send_msg(
|
||||
ProvisionerMessage::RequestInherentData(parent, sender),
|
||||
std::any::type_name::<Self>(),
|
||||
).await;
|
||||
overseer
|
||||
.send_msg(
|
||||
ProvisionerMessage::RequestInherentData(parent, sender),
|
||||
std::any::type_name::<Self>(),
|
||||
)
|
||||
.await;
|
||||
|
||||
receiver.await.map_err(|_| Error::ClosedChannelAwaitingInherentData)
|
||||
};
|
||||
@@ -96,7 +98,7 @@ impl ParachainsInherentDataProvider {
|
||||
disputes: Vec::new(),
|
||||
parent_header,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Ok(Self { inherent_data })
|
||||
@@ -105,11 +107,12 @@ impl ParachainsInherentDataProvider {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl sp_inherents::InherentDataProvider for ParachainsInherentDataProvider {
|
||||
fn provide_inherent_data(&self, inherent_data: &mut sp_inherents::InherentData) -> Result<(), sp_inherents::Error> {
|
||||
inherent_data.put_data(
|
||||
polkadot_primitives::v1::PARACHAINS_INHERENT_IDENTIFIER,
|
||||
&self.inherent_data,
|
||||
)
|
||||
fn provide_inherent_data(
|
||||
&self,
|
||||
inherent_data: &mut sp_inherents::InherentData,
|
||||
) -> Result<(), sp_inherents::Error> {
|
||||
inherent_data
|
||||
.put_data(polkadot_primitives::v1::PARACHAINS_INHERENT_IDENTIFIER, &self.inherent_data)
|
||||
}
|
||||
|
||||
async fn try_handle_error(
|
||||
|
||||
Reference in New Issue
Block a user