mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
MaxRequests -> MaxFreeMandatoryHeadersPerBlock in pallet-bridge-grandpa (#1997)
* MaxRequests -> MaxFreeMandatoryHeadersPerBlock in pallet-bridge-grandpa * fix comment * fix comment * fix comment
This commit is contained in:
committed by
Bastian Köcher
parent
068f6f648b
commit
fd3ebdf138
@@ -399,11 +399,7 @@ pub type RialtoGrandpaInstance = ();
|
||||
impl pallet_bridge_grandpa::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = bp_rialto::Rialto;
|
||||
// This is a pretty unscientific cap.
|
||||
//
|
||||
// Note that once this is hit the pallet will essentially throttle incoming requests down to one
|
||||
// call per block.
|
||||
type MaxRequests = ConstU32<50>;
|
||||
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
|
||||
type HeadersToKeep = ConstU32<{ bp_rialto::DAYS }>;
|
||||
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
|
||||
}
|
||||
@@ -412,7 +408,7 @@ pub type WestendGrandpaInstance = pallet_bridge_grandpa::Instance1;
|
||||
impl pallet_bridge_grandpa::Config<WestendGrandpaInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = bp_westend::Westend;
|
||||
type MaxRequests = ConstU32<50>;
|
||||
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
|
||||
type HeadersToKeep = ConstU32<{ bp_westend::DAYS }>;
|
||||
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -540,11 +540,7 @@ pub type MillauGrandpaInstance = ();
|
||||
impl pallet_bridge_grandpa::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
/// This is a pretty unscientific cap.
|
||||
///
|
||||
/// Note that once this is hit the pallet will essentially throttle incoming requests down to
|
||||
/// one call per block.
|
||||
type MaxRequests = ConstU32<50>;
|
||||
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
|
||||
type HeadersToKeep = ConstU32<{ bp_millau::DAYS as u32 }>;
|
||||
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -396,11 +396,7 @@ pub type MillauGrandpaInstance = ();
|
||||
impl pallet_bridge_grandpa::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
/// This is a pretty unscientific cap.
|
||||
///
|
||||
/// Note that once this is hit the pallet will essentially throttle incoming requests down to
|
||||
/// one call per block.
|
||||
type MaxRequests = ConstU32<50>;
|
||||
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
|
||||
type HeadersToKeep = ConstU32<{ bp_millau::DAYS as u32 }>;
|
||||
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -178,9 +178,9 @@ where
|
||||
GI: 'static,
|
||||
{
|
||||
assert!(
|
||||
R::MaxRequests::get() > 0,
|
||||
"MaxRequests ({}) must be larger than zero",
|
||||
R::MaxRequests::get(),
|
||||
R::HeadersToKeep::get() > 0,
|
||||
"HeadersToKeep ({}) must be larger than zero",
|
||||
R::HeadersToKeep::get(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ impl pallet_transaction_payment::Config for TestRuntime {
|
||||
impl pallet_bridge_grandpa::Config for TestRuntime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = BridgedUnderlyingChain;
|
||||
type MaxRequests = ConstU32<50>;
|
||||
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
|
||||
type HeadersToKeep = ConstU32<8>;
|
||||
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<TestRuntime>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user