Import queue API revamp (#2856)

* ImportQueue methods are now mut

* Link methods are now mut

* Remove Arc from BasicSyncQueue

* Fix tests

* Remove BasicSyncQueue

* Change the import queue API

* Add buffered_link

* Remove obsolete tests

* Comments and style improvement pass

* Fix grandpa and comment cleanup

* Update core/consensus/common/src/import_queue.rs

Co-Authored-By: André Silva <andre.beat@gmail.com>
This commit is contained in:
Pierre KriegerandAndré Silva authored and DemiMarie-parity committed 2019-06-18 21:50:48 -04:00
1 parent de6d541c74
commit 7efc504d59
9 files changed
+566 -858

No files matched your search

@@ -195,7 +195,7 @@ pub trait JustificationImport<B: BlockT> {
type Error: ::std::error::Error + Send + 'static;
/// Called by the import queue when it is started.
fn on_start(&self, _link: &dyn crate::import_queue::Link<B>) { }
fn on_start(&self, _link: &mut dyn crate::import_queue::Link<B>) { }
/// Import a Block justification and finalize the given block.
fn import_justification(
@@ -211,7 +211,7 @@ pub trait FinalityProofImport<B: BlockT> {
type Error: std::error::Error + Send + 'static;
/// Called by the import queue when it is started.
fn on_start(&self, _link: &dyn crate::import_queue::Link<B>) { }
fn on_start(&self, _link: &mut dyn crate::import_queue::Link<B>) { }
/// Import a Block justification and finalize the given block. Returns finalized block or error.
fn import_finality_proof(
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -26,7 +26,7 @@
// our error-chain could potentially blow up otherwise
#![recursion_limit="128"]
#[macro_use] extern crate crossbeam_channel;
extern crate crossbeam_channel;
#[macro_use] extern crate log;
use std::sync::Arc;