mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 05:57:59 +00:00
Generalize the Consensus Infrastructure (#883)
* Split out Consensus * Supply ImportQueue through network-service - simplify ImportQueue.import_blocks - remove Deadlock on import_block - Adding Verifier-Trait - Implement import_queue provisioning in service; allow cli to import * Allow to actually customize import queue * Consensus Gossip: Cache Message hash per Topic
This commit is contained in:
committed by
GitHub
parent
a24e61cb29
commit
ac4bcf879f
@@ -47,7 +47,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Get header and body of a relay chain block.
|
||||
#[rpc(name = "chain_getBlock")]
|
||||
fn block(&self, Trailing<Hash>) -> Result<Option<SignedBlock<Header, Extrinsic, Hash>>>;
|
||||
fn block(&self, Trailing<Hash>) -> Result<Option<SignedBlock<Header, Extrinsic>>>;
|
||||
|
||||
/// Get hash of the n-th block in the canon chain.
|
||||
///
|
||||
@@ -114,7 +114,9 @@ impl<B, E, Block> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Block::
|
||||
Ok(self.client.header(&BlockId::Hash(hash))?)
|
||||
}
|
||||
|
||||
fn block(&self, hash: Trailing<Block::Hash>) -> Result<Option<SignedBlock<Block::Header, Block::Extrinsic, Block::Hash>>> {
|
||||
fn block(&self, hash: Trailing<Block::Hash>)
|
||||
-> Result<Option<SignedBlock<Block::Header, Block::Extrinsic>>>
|
||||
{
|
||||
let hash = self.unwrap_or_best(hash)?;
|
||||
Ok(self.client.block(&BlockId::Hash(hash))?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user