mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Collator node workflow (#280)
* arbitrary application logic in CLI * collation work * split up exit and work futures in application * collation node workflow * typo * indentation fix * doc grumbles * rename Application to Worker * refactor Worker::exit to exit_only
This commit is contained in:
committed by
Sergey Pepyakin
parent
6bfcbd6d59
commit
24f7b548dc
@@ -79,6 +79,7 @@ pub use chain_spec::ChainSpec;
|
||||
/// Polkadot service.
|
||||
pub struct Service<Components: components::Components> {
|
||||
client: Arc<Client<Components::Backend, Components::Executor, Block>>,
|
||||
api: Arc<Components::Api>,
|
||||
network: Arc<NetworkService>,
|
||||
transaction_pool: Arc<TransactionPool<Components::Api>>,
|
||||
signal: Option<Signal>,
|
||||
@@ -213,6 +214,7 @@ impl<Components> Service<Components>
|
||||
network: network,
|
||||
transaction_pool: transaction_pool,
|
||||
signal: Some(signal),
|
||||
api: api,
|
||||
_consensus: consensus_service,
|
||||
})
|
||||
}
|
||||
@@ -222,6 +224,11 @@ impl<Components> Service<Components>
|
||||
self.client.clone()
|
||||
}
|
||||
|
||||
/// Get shared polkadot-api instance. usually the same as the client.
|
||||
pub fn api(&self) -> Arc<Components::Api> {
|
||||
self.api.clone()
|
||||
}
|
||||
|
||||
/// Get shared network instance.
|
||||
pub fn network(&self) -> Arc<NetworkService> {
|
||||
self.network.clone()
|
||||
|
||||
Reference in New Issue
Block a user