mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Remove unneeded Serde requirements (#1076)
* Remove superfluous serde requirements. * Try to ensure hash is serde * Fixups * Building again * Attempt to reenable Block (doesn't build) * Fixes compilation for node cli * Fixes test compilation * Fix wasm * Fix tests * Remove unneeded changes * Fix up comments * Reenable some code * Compile error when origin misused. * Remove unnecessary includes of `serde_derive` * Cleanups
This commit is contained in:
@@ -32,7 +32,7 @@ extern crate sr_primitives;
|
||||
extern crate log;
|
||||
|
||||
use std::io;
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use sr_primitives::{traits::{Block as BlockT, NumberFor}, generic::SignedBlock};
|
||||
|
||||
type Metadata = apis::metadata::Metadata;
|
||||
type RpcHandler = pubsub::PubSubHandler<Metadata>;
|
||||
@@ -40,7 +40,7 @@ pub type HttpServer = http::Server;
|
||||
pub type WsServer = ws::Server;
|
||||
|
||||
/// Construct rpc `IoHandler`
|
||||
pub fn rpc_handler<Block: BlockT, ExHash, PendingExtrinsics, S, C, A, Y>(
|
||||
pub fn rpc_handler<Block: BlockT, ExHash, S, C, A, Y>(
|
||||
state: S,
|
||||
chain: C,
|
||||
author: A,
|
||||
@@ -48,10 +48,10 @@ pub fn rpc_handler<Block: BlockT, ExHash, PendingExtrinsics, S, C, A, Y>(
|
||||
) -> RpcHandler where
|
||||
Block: BlockT + 'static,
|
||||
ExHash: Send + Sync + 'static + sr_primitives::Serialize + sr_primitives::DeserializeOwned,
|
||||
PendingExtrinsics: serde::Serialize + serde::de::DeserializeOwned + Send + Sync + 'static,
|
||||
SignedBlock<Block>: serde::Serialize + sr_primitives::DeserializeOwned,
|
||||
S: apis::state::StateApi<Block::Hash, Metadata=Metadata>,
|
||||
C: apis::chain::ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Block::Extrinsic, Metadata=Metadata>,
|
||||
A: apis::author::AuthorApi<ExHash, Block::Hash, Block::Extrinsic, PendingExtrinsics, Metadata=Metadata>,
|
||||
C: apis::chain::ChainApi<Block::Hash, Block::Header, NumberFor<Block>, SignedBlock<Block>, Metadata=Metadata>,
|
||||
A: apis::author::AuthorApi<ExHash, Block::Hash, Metadata=Metadata>,
|
||||
Y: apis::system::SystemApi,
|
||||
{
|
||||
let mut io = pubsub::PubSubHandler::default();
|
||||
|
||||
Reference in New Issue
Block a user