mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Finality Pallet Rate Limiter (#720)
* Add simple rate limiting mechanism * Add tests * Small test cleanup * Hook MaxRequests into runtimes
This commit is contained in:
committed by
Bastian Köcher
parent
010748e409
commit
d835233571
@@ -407,11 +407,20 @@ impl pallet_substrate_bridge::Config for Runtime {
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// 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.
|
||||
pub const MaxRequests: u32 = 50;
|
||||
}
|
||||
|
||||
impl pallet_finality_verifier::Config for Runtime {
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
type HeaderChain = pallet_substrate_bridge::Module<Runtime>;
|
||||
type AncestryProof = Vec<bp_millau::Header>;
|
||||
type AncestryChecker = bp_header_chain::LinearAncestryChecker;
|
||||
type MaxRequests = MaxRequests;
|
||||
}
|
||||
|
||||
impl pallet_shift_session_manager::Config for Runtime {}
|
||||
|
||||
Reference in New Issue
Block a user