Cleanup: Remove polkadot-service dependency from minimal node (#2430)

* Remove polkadot-service dependency from minimal-node

* Clean up error handline

* Remove unwanted changes

* Unused deps
This commit is contained in:
Sebastian Kunert authored and GitHub committed 2023-04-04 15:05:38 +00:00
1 parent 5ed3677723
commit 88ead41f9d
5 files changed
+35 -20

No files matched your search

+9 -1
View File
@@ -46,7 +46,9 @@ pub enum RelayChainError {
WaitTimeout(PHash),
#[error("Import listener closed while waiting for relay-chain block `{0}` to be imported.")]
ImportListenerClosed(PHash),
#[error("Blockchain returned an error while waiting for relay-chain block `{0}` to be imported: {1}")]
#[error(
"Blockchain returned an error while waiting for relay-chain block `{0}` to be imported: {1}"
)]
WaitBlockchainError(PHash, sp_blockchain::Error),
#[error("Blockchain returned an error: {0}")]
BlockchainError(#[from] sp_blockchain::Error),
@@ -86,6 +88,12 @@ impl From<RelayChainError> for sp_blockchain::Error {
}
}
impl<T: std::error::Error + Send + Sync + 'static> From<Box<T>> for RelayChainError {
fn from(r: Box<T>) -> Self {
RelayChainError::Application(r)
}
}
/// Trait that provides all necessary methods for interaction between collator and relay chain.
#[async_trait]
pub trait RelayChainInterface: Send + Sync {