mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Custom RPC implementation for node. (#3109)
* Allow RPCs to be customized. * Implement node-rpc extensions. * Working on a test. * Add node-testing crate. * Fix genesis test config * Fix nonce lookups. * Clean up. * Fix expected block type. * Make the RPC extension function optional. * Fix service doc test. * Bump jsonrpc. * Bump client version. * Update Cargo.lock * Update jsonrpc. * Fix build. * Remove unused imports. * Fix signed extra. * Post merge clean up. * Fix tests. * Patch hashmap-core. * Fix build. * Fix build. * Remove hashmap_core patches.
This commit is contained in:
committed by
Gavin Wood
parent
95abffc8e4
commit
56296386ab
@@ -278,6 +278,17 @@ construct_service_factory! {
|
||||
FinalityProofProvider = { |client: Arc<FullClient<Self>>| {
|
||||
Ok(Some(Arc::new(GrandpaFinalityProofProvider::new(client.clone(), client)) as _))
|
||||
}},
|
||||
|
||||
RpcExtensions = jsonrpc_core::IoHandler<substrate_rpc::Metadata>
|
||||
{ |client, pool| {
|
||||
use node_rpc::accounts::{Accounts, AccountsApi};
|
||||
|
||||
let mut io = jsonrpc_core::IoHandler::default();
|
||||
io.extend_with(
|
||||
AccountsApi::to_delegate(Accounts::new(client, pool))
|
||||
);
|
||||
io
|
||||
}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user