Box large arguments of GRANDPA pallet (#1154)

* box large arguments

* benchmarks

* fix
This commit is contained in:
Svyatoslav Nikolsky
2021-09-22 13:20:10 +03:00
committed by Bastian Köcher
parent 782d37522f
commit 084da4343d
18 changed files with 67 additions and 33 deletions
+2 -1
View File
@@ -29,6 +29,7 @@ use serde::{Deserialize, Serialize};
use sp_finality_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID};
use sp_runtime::RuntimeDebug;
use sp_runtime::{generic::OpaqueDigestItemId, traits::Header as HeaderT};
use sp_std::boxed::Box;
pub mod justification;
@@ -62,7 +63,7 @@ impl AuthoritySet {
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct InitializationData<H: HeaderT> {
/// The header from which we should start syncing.
pub header: H,
pub header: Box<H>,
/// The initial authorities of the pallet.
pub authority_list: AuthorityList,
/// The ID of the initial authority set.