mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Rewrite the BasiQueue using channels (#1327)
* use channels to implement basic import queue * async justification import * better conditional for is_done in tests * reword the test for presence of link * fix conditional * trace instead of panic when no link present * reword expectations when sending to importers * fix * debug justification import error * update expectations * use NumberFor * nits * add general description * move error handling into closure
This commit is contained in:
committed by
Gav Wood
parent
797de27d2b
commit
72bb8ef4c5
@@ -131,7 +131,7 @@ pub fn import_blocks<F, E, R>(
|
||||
|
||||
let (wait_send, wait_recv) = std::sync::mpsc::channel();
|
||||
let wait_link = WaitLink::new(wait_send);
|
||||
queue.start(wait_link)?;
|
||||
queue.start(Box::new(wait_link))?;
|
||||
|
||||
let (exit_send, exit_recv) = std::sync::mpsc::channel();
|
||||
::std::thread::spawn(move || {
|
||||
|
||||
@@ -123,7 +123,7 @@ impl<Components: components::Components> Service<Components> {
|
||||
};
|
||||
|
||||
let (client, on_demand) = Components::build_client(&config, executor)?;
|
||||
let import_queue = Arc::new(Components::build_import_queue(&mut config, client.clone())?);
|
||||
let import_queue = Box::new(Components::build_import_queue(&mut config, client.clone())?);
|
||||
let best_header = client.best_block_header()?;
|
||||
|
||||
let version = config.full_version();
|
||||
|
||||
Reference in New Issue
Block a user