mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Unstable Backend: add back the old chainHead RPCs/tests (#1137)
* add back unstable APIs and tests * clippy fixes * fmt with new rust * deserialize from object or array into api versions * remove inspect * add some of the other unstable RPC methods we might want * clippy fix * no unused deps warning in test crate * fix doc fails * legacy -> unstable Co-authored-by: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com> * runtime_updates -> with_runtiem * add test and be consistent with naming of unstable RPCs --------- Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com>
This commit is contained in:
@@ -82,7 +82,7 @@ pub trait Hasher {
|
||||
}
|
||||
|
||||
/// This represents the block header type used by a node.
|
||||
pub trait Header: Sized + Encode {
|
||||
pub trait Header: Sized + Encode + Decode {
|
||||
/// The block number type for this header.
|
||||
type Number: Into<u64>;
|
||||
/// The hasher used to hash this header.
|
||||
@@ -105,7 +105,7 @@ mod substrate_impls {
|
||||
|
||||
impl<N, H> Header for sp_runtime::generic::Header<N, H>
|
||||
where
|
||||
Self: Encode,
|
||||
Self: Encode + Decode,
|
||||
N: Copy + Into<U256> + Into<u64> + TryFrom<U256>,
|
||||
H: sp_runtime::traits::Hash + Hasher,
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ impl<N, H> Header for SubstrateHeader<N, H>
|
||||
where
|
||||
N: Copy + Into<u64> + Into<U256> + TryFrom<U256> + Encode,
|
||||
H: Hasher + Encode,
|
||||
SubstrateHeader<N, H>: Encode,
|
||||
SubstrateHeader<N, H>: Encode + Decode,
|
||||
{
|
||||
type Number = N;
|
||||
type Hasher = H;
|
||||
|
||||
Reference in New Issue
Block a user