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:
@@ -39,7 +39,7 @@ use self::error::Result;
|
||||
|
||||
build_rpc_trait! {
|
||||
/// Substrate blockchain API
|
||||
pub trait ChainApi<Hash, Header, Number, Extrinsic> {
|
||||
pub trait ChainApi<Hash, Header, Number, SignedBlock> {
|
||||
type Metadata;
|
||||
|
||||
/// Get header of a relay chain block.
|
||||
@@ -48,7 +48,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Get header and body of a relay chain block.
|
||||
#[rpc(name = "chain_getBlock")]
|
||||
fn block(&self, Trailing<Hash>) -> Result<Option<SignedBlock<Header, Extrinsic>>>;
|
||||
fn block(&self, Trailing<Hash>) -> Result<Option<SignedBlock>>;
|
||||
|
||||
/// Get hash of the n-th block in the canon chain.
|
||||
///
|
||||
@@ -163,7 +163,7 @@ impl<B, E, Block> Chain<B, E, Block> where
|
||||
}
|
||||
}
|
||||
|
||||
impl<B, E, Block> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Block::Extrinsic> for Chain<B, E, Block> where
|
||||
impl<B, E, Block> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, SignedBlock<Block>> for Chain<B, E, Block> where
|
||||
Block: BlockT<Hash=H256> + 'static,
|
||||
B: client::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
|
||||
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
|
||||
@@ -176,7 +176,7 @@ impl<B, E, Block> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Block::
|
||||
}
|
||||
|
||||
fn block(&self, hash: Trailing<Block::Hash>)
|
||||
-> Result<Option<SignedBlock<Block::Header, Block::Extrinsic>>>
|
||||
-> Result<Option<SignedBlock<Block>>>
|
||||
{
|
||||
let hash = self.unwrap_or_best(hash)?;
|
||||
Ok(self.client.block(&BlockId::Hash(hash))?)
|
||||
|
||||
Reference in New Issue
Block a user