mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Bump polkadot (#2585)
* Bump polkadot * Another bump * Fix for `GrandpaJustification` + `Debug` --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e98f9dfbef
commit
47858e90e4
Generated
+248
-247
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,7 @@ use sp_std::{
|
||||
///
|
||||
/// This particular proof is used to prove that headers on a bridged chain
|
||||
/// (so not our chain) have been finalized correctly.
|
||||
#[derive(Encode, Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)]
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)]
|
||||
pub struct GrandpaJustification<Header: HeaderT> {
|
||||
/// The round (voting period) this justification is valid for.
|
||||
pub round: u64,
|
||||
@@ -49,6 +49,24 @@ pub struct GrandpaJustification<Header: HeaderT> {
|
||||
pub votes_ancestries: Vec<Header>,
|
||||
}
|
||||
|
||||
impl<Header: HeaderT> sp_std::fmt::Debug for GrandpaJustification<Header> {
|
||||
fn fmt(&self, fmt: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
#[cfg(feature = "std")]
|
||||
{
|
||||
fmt.debug_struct("GrandpaJustification")
|
||||
.field("round", &self.round)
|
||||
.field("commit", &self.commit)
|
||||
.field("votes_ancestries", &self.votes_ancestries)
|
||||
.finish()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
{
|
||||
fmt.write_str("<stripped>")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: HeaderT> GrandpaJustification<H> {
|
||||
/// Returns reasonable size of justification using constants from the provided chain.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user