2

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(),
        config.prometheus_registry(),
        task_manager.spawn_handle(),
        client.clone(),
        on_demand.clone(),
    ));

and the compiler is unhappy about task_manager.spawn_handle() not implementing SpawnEssentialNamed. So I look at the docs and find a spawn_essential_handle() which fixes the error.

My question out of curiousity is why are there two versions of spawn_handles? I can read and make out that spawn_essential_handle is supposed to take the node down with it if the task it spawned failed. Any other differences we should know about?

1 Answer 1

4

No, that is the difference.

The idea is that you can spawn these essential tasks and if the future resolves it means the node needs to stop. For example because the import pipeline stopped working. Otherwise there is no difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.