mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 02:31:03 +00:00
only store header state root (pallet-bridge-grandpa) (#1699)
This commit is contained in:
committed by
Bastian Köcher
parent
b94bd8d46b
commit
7014046485
@@ -96,10 +96,34 @@ pub const ROOT_ACCOUNT_DERIVATION_PREFIX: &[u8] = b"pallet-bridge/account-deriva
|
||||
|
||||
/// Generic header Id.
|
||||
#[derive(
|
||||
RuntimeDebug, Default, Clone, Encode, Decode, Copy, Eq, Hash, PartialEq, PartialOrd, Ord,
|
||||
RuntimeDebug,
|
||||
Default,
|
||||
Clone,
|
||||
Encode,
|
||||
Decode,
|
||||
Copy,
|
||||
Eq,
|
||||
Hash,
|
||||
MaxEncodedLen,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
Ord,
|
||||
TypeInfo,
|
||||
)]
|
||||
pub struct HeaderId<Hash, Number>(pub Number, pub Hash);
|
||||
|
||||
impl<Hash: Copy, Number: Copy> HeaderId<Hash, Number> {
|
||||
/// Return header number.
|
||||
pub fn number(&self) -> Number {
|
||||
self.0
|
||||
}
|
||||
|
||||
/// Return header hash.
|
||||
pub fn hash(&self) -> Hash {
|
||||
self.1
|
||||
}
|
||||
}
|
||||
|
||||
/// Generic header id provider.
|
||||
pub trait HeaderIdProvider<Header: HeaderT> {
|
||||
// Get the header id.
|
||||
|
||||
Reference in New Issue
Block a user