Questions tagged [service]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

Implementing FullDeps in Substrate rpc.rs using channels instead of Arcs

This is a standard implementation of FullDeps in the rpc.rs: // Full client dependencies. pub struct FullDeps<C, P, SC, B> { /// The client instance to use. pub client: Arc<C>, ...
Discardo's user avatar
  • 382
1 vote
0 answers
23 views

how to solve mismatched type error in substrate?

I have been integrating paritytech frontier(0.9.43) version with the substrate 0.9.43 version . while integrating when i added frontier changes in rpc.rs and service.rs file i am facing this error. ...
Karanvir Singh's user avatar
4 votes
1 answer
48 views

offchain-workers vs asynchronous task

There is not much info about using an asynchronous task in substrate docs i.e. task_manager in service.rs I want to know when one should be using offchain-worker and when one should use background ...
Rusty Pythonic Script's user avatar
11 votes
1 answer
125 views

Understanding service.rs in substrate-node-template

Recently, I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs: 1- In the new_partial() method when ...
dadzerlaze's user avatar
  • 1,073
1 vote
1 answer
103 views

Problem while adding new API to runtime, RPC, and service

pub fn create_full<C, P>( deps: FullDeps<C, P>, ) -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>> where C: ProvideRuntimeApi<Block> + ...
hgminerva's user avatar
  • 467
4 votes
1 answer
87 views

How do I include a new rpc that uses a NetworkWorker in the node-template?

The node-template says its service.rs is a specialisation of that on the substrate master branch. Hence, it's sort of hard to relate the two. Nonetheless, I'd like to expose an RPC endpoint that's ...
islami00's user avatar
  • 561
2 votes
1 answer
37 views

Difference between spawn_handle() and spawn_essential_handle()

Currently this is how I am making a transaction_pool for a Light service let transaction_pool = Arc::new(sc_transaction_pool::LightPool::new_light( config.transaction_pool.clone(), ...
Purple_Turtle's user avatar