mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Move Chain trait to runtime primitives (#403)
* extract ChainBase to bp-runtime * post-merge fixes * cargo fmt --all * compilation fixes * reexport BlockNumberOf, HashOf, HeaderOf
This commit is contained in:
committed by
Bastian Köcher
parent
ddeb59d336
commit
9e9ac8df3c
@@ -20,6 +20,8 @@
|
||||
// Runtime-generated DecodeLimit::decode_all_With_depth_limit
|
||||
#![allow(clippy::unnecessary_mut_passed)]
|
||||
|
||||
use bp_runtime::Chain;
|
||||
use frame_support::RuntimeDebug;
|
||||
use sp_core::Hasher as HasherT;
|
||||
use sp_runtime::traits::BlakeTwo256;
|
||||
use sp_std::prelude::*;
|
||||
@@ -36,6 +38,17 @@ pub type Hasher = BlakeTwo256;
|
||||
/// The header type used by Rialto.
|
||||
pub type Header = sp_runtime::generic::Header<BlockNumber, Hasher>;
|
||||
|
||||
/// Rialto chain.
|
||||
#[derive(RuntimeDebug)]
|
||||
pub struct Rialto;
|
||||
|
||||
impl Chain for Rialto {
|
||||
type BlockNumber = BlockNumber;
|
||||
type Hash = Hash;
|
||||
type Hasher = Hasher;
|
||||
type Header = Header;
|
||||
}
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
/// API for querying information about Rialto headers from the Bridge Pallet instance.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user