mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
removes use of sc_client::Client from sc-rpc (#5063)
* removes use of sc_client::Client from sc-rpc * remove Client impl from sc-finality-benches * remove client impl from sc-finality-grandpa * read_proof accepts iterator * remove generic Executor param from ExecutorProvider * fix long ass line * code style changes * merge with master Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
dc85ccb7df
commit
99ae5342eb
@@ -57,11 +57,11 @@ use futures::StreamExt;
|
||||
use log::{debug, info};
|
||||
use futures::channel::mpsc;
|
||||
use sc_client_api::{
|
||||
backend::{AuxStore, Backend},
|
||||
LockImportRun, BlockchainEvents, CallExecutor,
|
||||
backend::{AuxStore, Backend}, ExecutionStrategy, Finalizer, TransactionFor,
|
||||
ExecutionStrategy, Finalizer, TransactionFor, ExecutorProvider,
|
||||
};
|
||||
use sp_blockchain::{HeaderBackend, Error as ClientError, HeaderMetadata};
|
||||
use sc_client::Client;
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT, DigestFor, Zero};
|
||||
@@ -96,7 +96,7 @@ mod observer;
|
||||
mod until_imported;
|
||||
mod voting_rule;
|
||||
|
||||
pub use finality_proof::FinalityProofProvider;
|
||||
pub use finality_proof::{FinalityProofProvider, StorageAndProofProvider};
|
||||
pub use justification::GrandpaJustification;
|
||||
pub use light_import::light_block_import;
|
||||
pub use voting_rule::{
|
||||
@@ -266,7 +266,7 @@ impl<Block: BlockT, Client> BlockStatus<Block> for Arc<Client> where
|
||||
pub trait ClientForGrandpa<Block, BE>:
|
||||
LockImportRun<Block, BE> + Finalizer<Block, BE> + AuxStore
|
||||
+ HeaderMetadata<Block, Error = sp_blockchain::Error> + HeaderBackend<Block>
|
||||
+ BlockchainEvents<Block> + ProvideRuntimeApi<Block>
|
||||
+ BlockchainEvents<Block> + ProvideRuntimeApi<Block> + ExecutorProvider<Block>
|
||||
+ BlockImport<Block, Transaction = TransactionFor<BE, Block>, Error = sp_consensus::Error>
|
||||
where
|
||||
BE: Backend<Block>,
|
||||
@@ -279,7 +279,7 @@ impl<Block, BE, T> ClientForGrandpa<Block, BE> for T
|
||||
Block: BlockT,
|
||||
T: LockImportRun<Block, BE> + Finalizer<Block, BE> + AuxStore
|
||||
+ HeaderMetadata<Block, Error = sp_blockchain::Error> + HeaderBackend<Block>
|
||||
+ BlockchainEvents<Block> + ProvideRuntimeApi<Block>
|
||||
+ BlockchainEvents<Block> + ProvideRuntimeApi<Block> + ExecutorProvider<Block>
|
||||
+ BlockImport<Block, Transaction = TransactionFor<BE, Block>, Error = sp_consensus::Error>,
|
||||
{}
|
||||
|
||||
@@ -387,11 +387,8 @@ pub trait GenesisAuthoritySetProvider<Block: BlockT> {
|
||||
fn get(&self) -> Result<AuthorityList, ClientError>;
|
||||
}
|
||||
|
||||
impl<B, E, Block: BlockT, RA> GenesisAuthoritySetProvider<Block> for Client<B, E, Block, RA>
|
||||
where
|
||||
B: Backend<Block> + Send + Sync + 'static,
|
||||
E: CallExecutor<Block> + Send + Sync,
|
||||
RA: Send + Sync,
|
||||
impl<Block: BlockT, E> GenesisAuthoritySetProvider<Block> for Arc<dyn ExecutorProvider<Block, Executor = E>>
|
||||
where E: CallExecutor<Block>,
|
||||
{
|
||||
fn get(&self) -> Result<AuthorityList, ClientError> {
|
||||
// This implementation uses the Grandpa runtime API instead of reading directly from the
|
||||
|
||||
Reference in New Issue
Block a user