Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use bp_header_chain::max_expected_submit_finality_proof_arguments_siz…
…e to compute extra size
  • Loading branch information
svyatonik committed Dec 12, 2023
commit 01ed0c005c3f8e37e479a6340e667129bc7a017a
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ where
+ pallet_utility::Config,
GPI: 'static,
MPI: 'static,
// <Runtime as pallet_bridge_grandpa::Config<GPI>>::BridgedChain: ChainWithGrandpa,
<Runtime as pallet_bridge_messages::Config<MPI>>::TargetHeaderChain: TargetHeaderChain<
XcmAsPlainPayload,
Runtime::AccountId,
Expand Down Expand Up @@ -238,7 +237,8 @@ where

/// Maximal expected `submit_finality_proof` call size.
pub fn maximal_expected_submit_finality_proof_call_size<BridgedChain: ChainWithGrandpa>() -> usize {
BridgedChain::AVERAGE_HEADER_SIZE
.saturating_mul(BridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY.saturating_add(1))
as usize
bp_header_chain::max_expected_submit_finality_proof_arguments_size::<BridgedChain>(
false,
BridgedChain::MAX_AUTHORITIES_COUNT * 2 / 3 + 1,
) as usize
}