mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Use GrandpaJustification instead of Vec<u8> in Pallet API (#847)
* Stop passing raw encoded justifications to pallet API By having the API accept a struct-ified justification we are able to better utilize the justifications fields for weight calculations. * Update relayer code to use decoded justifications * Add justification to `expect()` statement * Fix some imports * Make justification wrapper contain decoded justification * Rename some fields * Get rid of warnings * Appease Clippy * Only decode justification once at init time * Remove unnecessary method * Remove justification wrapper This became kinda unnecessary since we could implement the FinalityProof trait on GrandpaJustification directly.
This commit is contained in:
committed by
Bastian Köcher
parent
904b9f4da5
commit
67cdca8aa4
@@ -94,6 +94,12 @@ impl<H: Default, E> HeaderChain<H, E> for () {
|
||||
}
|
||||
}
|
||||
|
||||
/// Abstract finality proof that is justifying block finality.
|
||||
pub trait FinalityProof<Number>: Clone + Send + Sync + Debug {
|
||||
/// Return number of header that this proof is generated for.
|
||||
fn target_header_number(&self) -> Number;
|
||||
}
|
||||
|
||||
/// Find header digest that schedules next GRANDPA authorities set.
|
||||
pub fn find_grandpa_authorities_scheduled_change<H: HeaderT>(
|
||||
header: &H,
|
||||
|
||||
Reference in New Issue
Block a user