Move Engine::register_client to be before other I/O handler registration (#10767)
This commit is contained in:
parent
f2dd032884
commit
02eb046774
@ -75,9 +75,8 @@ impl<T: ChainDataFetcher> Service<T> {
|
|||||||
io_service.channel(),
|
io_service.channel(),
|
||||||
cache,
|
cache,
|
||||||
)?);
|
)?);
|
||||||
|
|
||||||
io_service.register_handler(Arc::new(ImportBlocks(client.clone()))).map_err(Error::Io)?;
|
|
||||||
spec.engine.register_client(Arc::downgrade(&client) as _);
|
spec.engine.register_client(Arc::downgrade(&client) as _);
|
||||||
|
io_service.register_handler(Arc::new(ImportBlocks(client.clone()))).map_err(Error::Io)?;
|
||||||
|
|
||||||
Ok(Service {
|
Ok(Service {
|
||||||
client,
|
client,
|
||||||
|
@ -113,6 +113,7 @@ impl ClientService {
|
|||||||
miner.clone(),
|
miner.clone(),
|
||||||
io_service.channel(),
|
io_service.channel(),
|
||||||
)?;
|
)?;
|
||||||
|
spec.engine.register_client(Arc::downgrade(&client) as _);
|
||||||
miner.set_io_channel(io_service.channel());
|
miner.set_io_channel(io_service.channel());
|
||||||
miner.set_in_chain_checker(&client.clone());
|
miner.set_in_chain_checker(&client.clone());
|
||||||
|
|
||||||
@ -148,8 +149,6 @@ impl ClientService {
|
|||||||
});
|
});
|
||||||
io_service.register_handler(client_io)?;
|
io_service.register_handler(client_io)?;
|
||||||
|
|
||||||
spec.engine.register_client(Arc::downgrade(&client) as _);
|
|
||||||
|
|
||||||
Ok(ClientService {
|
Ok(ClientService {
|
||||||
io_service: Arc::new(io_service),
|
io_service: Arc::new(io_service),
|
||||||
client: client,
|
client: client,
|
||||||
|
Loading…
Reference in New Issue
Block a user