mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
removes use of sc_client::Client from sc_network (#5147)
* removes use of sc_client::Client from sc_network * rename BlockProvider to BlockBackend * fix broken test
This commit is contained in:
@@ -35,6 +35,7 @@ use crate::execution_extensions::ExecutionExtensions;
|
||||
pub trait ExecutorProvider<Block: BlockT> {
|
||||
/// executor instance
|
||||
type Executor: CallExecutor<Block>;
|
||||
|
||||
/// Get call executor reference.
|
||||
fn executor(&self) -> &Self::Executor;
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ use futures::channel::mpsc;
|
||||
use sp_core::storage::StorageKey;
|
||||
use sp_runtime::{
|
||||
traits::{Block as BlockT, NumberFor},
|
||||
generic::{BlockId, SignedBlock}
|
||||
generic::{BlockId, SignedBlock},
|
||||
Justification,
|
||||
};
|
||||
use sp_consensus::BlockOrigin;
|
||||
|
||||
@@ -73,8 +74,8 @@ pub trait BlockchainEvents<Block: BlockT> {
|
||||
) -> sp_blockchain::Result<StorageEventStream<Block::Hash>>;
|
||||
}
|
||||
|
||||
/// Fetch block body by ID.
|
||||
pub trait BlockBody<Block: BlockT> {
|
||||
/// Interface for fetching block data.
|
||||
pub trait BlockBackend<Block: BlockT> {
|
||||
/// Get block body by ID. Returns `None` if the body is not stored.
|
||||
fn block_body(
|
||||
&self,
|
||||
@@ -83,6 +84,12 @@ pub trait BlockBody<Block: BlockT> {
|
||||
|
||||
/// Get full block by id.
|
||||
fn block(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<SignedBlock<Block>>>;
|
||||
|
||||
/// Get block status.
|
||||
fn block_status(&self, id: &BlockId<Block>) -> sp_blockchain::Result<sp_consensus::BlockStatus>;
|
||||
|
||||
/// Get block justification set by id.
|
||||
fn justification(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<Justification>>;
|
||||
}
|
||||
|
||||
/// Provide a list of potential uncle headers for a given block.
|
||||
|
||||
Reference in New Issue
Block a user