/// Creates a new dispatcher with the specified runtimes.
Creates a new dispatcher with the specified runtimes.
Creates a new dispatcher with the specified runtimes .
pub(crate) fn new(
        blockchain: &Blockchain,
        runtimes: impl IntoIterator<Item = RuntimeInstance>,
    ) -> Self {
        let mut this = Self {
            runtimes: runtimes
                .into_iter()
                .map(|runtime| (runtime.id, runtime.instance))
                .collect(),
            service_infos: CommittedServices::default(),
            migrations: Migrations::new(blockchain),
        };
        for runtime in this.runtimes.values_mut() {
            runtime.initialize(blockchain);
        }
        this
    }
pub ( crate ) fn new ( blockchain : & Blockchain , runtimes : impl IntoIterator < Item = RuntimeInstance > , ) -> Self { let mut this = Self { runtimes : runtimes . into_iter ( ) . map ( | runtime | ( runtime . id , runtime . instance ) ) . collect ( ) , service_infos : CommittedServices :: default ( ) , migrations : Migrations :: new ( blockchain ) , } ; for runtime in this . runtimes . values_mut ( ) { runtime . initialize ( blockchain ) ; } this }
Creates a new dispatcher with the specified runtimes.
Creates a new dispatcher with the specified runtimes .
blockchain
&Blockchain
runtimes
impl IntoIterator<Item = RuntimeInstance>