mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 11:41:04 +00:00
BlockId removal: refactor: CallExecutor trait (#13173)
* BlockId removal: refactor: CallExecutor trait It changes the arguments of CallExecutor methods: - `call`, 'contextual_call', 'runtime_version', 'prove_execution' from: `BlockId<Block>` to: `Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * ".git/.scripts/commands/fmt/fmt.sh" Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
d2fcebef40
commit
025f9d9ba3
@@ -464,10 +464,10 @@ pub trait GenesisAuthoritySetProvider<Block: BlockT> {
|
||||
fn get(&self) -> Result<AuthorityList, ClientError>;
|
||||
}
|
||||
|
||||
impl<Block: BlockT, E> GenesisAuthoritySetProvider<Block>
|
||||
for Arc<dyn ExecutorProvider<Block, Executor = E>>
|
||||
impl<Block: BlockT, E, Client> GenesisAuthoritySetProvider<Block> for Arc<Client>
|
||||
where
|
||||
E: CallExecutor<Block>,
|
||||
Client: ExecutorProvider<Block, Executor = E> + HeaderBackend<Block>,
|
||||
{
|
||||
fn get(&self) -> Result<AuthorityList, ClientError> {
|
||||
// This implementation uses the Grandpa runtime API instead of reading directly from the
|
||||
@@ -475,7 +475,7 @@ where
|
||||
// the chain, whereas the runtime API is backwards compatible.
|
||||
self.executor()
|
||||
.call(
|
||||
&BlockId::Number(Zero::zero()),
|
||||
self.expect_block_hash_from_id(&BlockId::Number(Zero::zero()))?,
|
||||
"GrandpaApi_grandpa_authorities",
|
||||
&[],
|
||||
ExecutionStrategy::NativeElseWasm,
|
||||
|
||||
Reference in New Issue
Block a user