mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 17:21:07 +00:00
make SelectChain async (#9128)
* make SelectChain async * make JustificationImport async
This commit is contained in:
@@ -363,15 +363,16 @@ impl<B: BlockT, T, E: std::error::Error + Send + 'static, Transaction> BlockImpo
|
||||
}
|
||||
|
||||
/// Justification import trait
|
||||
#[async_trait::async_trait]
|
||||
pub trait JustificationImport<B: BlockT> {
|
||||
type Error: std::error::Error + Send + 'static;
|
||||
|
||||
/// Called by the import queue when it is started. Returns a list of justifications to request
|
||||
/// from the network.
|
||||
fn on_start(&mut self) -> Vec<(B::Hash, NumberFor<B>)> { Vec::new() }
|
||||
async fn on_start(&mut self) -> Vec<(B::Hash, NumberFor<B>)>;
|
||||
|
||||
/// Import a Block justification and finalize the given block.
|
||||
fn import_justification(
|
||||
async fn import_justification(
|
||||
&mut self,
|
||||
hash: B::Hash,
|
||||
number: NumberFor<B>,
|
||||
|
||||
Reference in New Issue
Block a user