mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 21:18:01 +00:00
ChainSpec trait (#5185)
* ChainSpec trait * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Added docs * Fixed build * Fixed build Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -79,12 +79,12 @@ fn build_runtime() -> Result<tokio::runtime::Runtime, std::io::Error> {
|
||||
|
||||
/// A helper function that runs a future with tokio and stops if the process receives the signal
|
||||
/// SIGTERM or SIGINT
|
||||
pub fn run_until_exit<FUT, ERR, G, E, F>(
|
||||
mut config: Configuration<G, E>,
|
||||
pub fn run_until_exit<FUT, ERR, F>(
|
||||
mut config: Configuration,
|
||||
future_builder: F,
|
||||
) -> error::Result<()>
|
||||
where
|
||||
F: FnOnce(Configuration<G, E>) -> error::Result<FUT>,
|
||||
F: FnOnce(Configuration) -> error::Result<FUT>,
|
||||
FUT: Future<Output = Result<(), ERR>> + future::Future,
|
||||
ERR: 'static + std::error::Error,
|
||||
{
|
||||
@@ -106,12 +106,12 @@ where
|
||||
|
||||
/// A helper function that runs an `AbstractService` with tokio and stops if the process receives
|
||||
/// the signal SIGTERM or SIGINT
|
||||
pub fn run_service_until_exit<T, G, E, F>(
|
||||
mut config: Configuration<G, E>,
|
||||
pub fn run_service_until_exit<T, F>(
|
||||
mut config: Configuration,
|
||||
service_builder: F,
|
||||
) -> error::Result<()>
|
||||
where
|
||||
F: FnOnce(Configuration<G, E>) -> Result<T, sc_service::error::Error>,
|
||||
F: FnOnce(Configuration) -> Result<T, sc_service::error::Error>,
|
||||
T: AbstractService + Unpin,
|
||||
{
|
||||
let mut runtime = build_runtime()?;
|
||||
|
||||
Reference in New Issue
Block a user