From bd27fbb1c3afa4e3168a94933628e77d80a7bda1 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 11 Oct 2024 15:49:55 -0400 Subject: [PATCH] Remove `MaxPendingAttestations` associated type --- pallets/attestation/src/mock.rs | 2 -- pallets/propagation/src/mock.rs | 2 -- pallets/registry/src/mock.rs | 2 -- pallets/staking/src/lib.rs | 3 --- pallets/staking/src/mock.rs | 2 -- runtime/src/lib.rs | 2 -- 6 files changed, 13 deletions(-) diff --git a/pallets/attestation/src/mock.rs b/pallets/attestation/src/mock.rs index 330301457..f75f82b58 100644 --- a/pallets/attestation/src/mock.rs +++ b/pallets/attestation/src/mock.rs @@ -310,13 +310,11 @@ impl Randomness for TestPastRandomness { } parameter_types! { pub const MaxEndpointLength: u32 = 3; - pub const MaxPendingAttestations: u32 = 4; } impl pallet_staking_extension::Config for Test { type AttestationHandler = (); type Currency = Balances; type MaxEndpointLength = MaxEndpointLength; - type MaxPendingAttestations = MaxPendingAttestations; type Randomness = TestPastRandomness; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); diff --git a/pallets/propagation/src/mock.rs b/pallets/propagation/src/mock.rs index de485a046..31e4e1600 100644 --- a/pallets/propagation/src/mock.rs +++ b/pallets/propagation/src/mock.rs @@ -303,14 +303,12 @@ impl Randomness for TestPastRandomness { parameter_types! { pub const MaxEndpointLength: u32 = 3; - pub const MaxPendingAttestations: u32 = 4; } impl pallet_staking_extension::Config for Test { type AttestationHandler = (); type Currency = Balances; type MaxEndpointLength = MaxEndpointLength; - type MaxPendingAttestations = MaxPendingAttestations; type Randomness = TestPastRandomness; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); diff --git a/pallets/registry/src/mock.rs b/pallets/registry/src/mock.rs index 451cd37df..4f20fe263 100644 --- a/pallets/registry/src/mock.rs +++ b/pallets/registry/src/mock.rs @@ -300,7 +300,6 @@ impl Randomness for TestPastRandomness { parameter_types! { pub const MaxEndpointLength: u32 = 3; - pub const MaxPendingAttestations: u32 = 4; } impl pallet_staking_extension::Config for Test { @@ -309,7 +308,6 @@ impl pallet_staking_extension::Config for Test { type MaxEndpointLength = MaxEndpointLength; type Randomness = TestPastRandomness; type RuntimeEvent = RuntimeEvent; - type MaxPendingAttestations = MaxPendingAttestations; type WeightInfo = (); } diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index a48d117fe..de5571eef 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -103,9 +103,6 @@ pub mod pallet { /// The maximum length of a threshold server's endpoint address, in bytes. type MaxEndpointLength: Get; - /// The maximum number of pending attestations that can be held in the validation queue. - type MaxPendingAttestations: Get; - /// The handler to use when issuing and verifying attestations. type AttestationHandler: entropy_shared::AttestationHandler; } diff --git a/pallets/staking/src/mock.rs b/pallets/staking/src/mock.rs index 80516c4ff..990b115a4 100644 --- a/pallets/staking/src/mock.rs +++ b/pallets/staking/src/mock.rs @@ -387,7 +387,6 @@ impl pallet_parameters::Config for Test { parameter_types! { pub const MaxEndpointLength: u32 = 3; - pub const MaxPendingAttestations: u32 = 4; } pub(crate) const VALID_QUOTE: [u8; 32] = [0; 32]; @@ -414,7 +413,6 @@ impl pallet_staking_extension::Config for Test { type AttestationHandler = MockAttestationHandler; type Currency = Balances; type MaxEndpointLength = MaxEndpointLength; - type MaxPendingAttestations = MaxPendingAttestations; type Randomness = TestPastRandomness; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 56a940123..b50d3dcaa 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -712,7 +712,6 @@ impl pallet_staking::Config for Runtime { parameter_types! { pub const MaxEndpointLength: u32 = 100; - pub const MaxPendingAttestations: u32 = 250; } impl pallet_staking_extension::Config for Runtime { @@ -721,7 +720,6 @@ impl pallet_staking_extension::Config for Runtime { type MaxEndpointLength = MaxEndpointLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type RuntimeEvent = RuntimeEvent; - type MaxPendingAttestations = MaxPendingAttestations; type WeightInfo = weights::pallet_staking_extension::WeightInfo; }