Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Remove MaxExecutionHeadersToKeep (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Mar 26, 2024
1 parent 9293295 commit aa3a75a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
3 changes: 0 additions & 3 deletions bridges/snowbridge/pallets/ethereum-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ pub mod pallet {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
#[pallet::constant]
type ForkVersions: Get<ForkVersions>;
/// Maximum number of execution headers to keep
#[pallet::constant]
type MaxExecutionHeadersToKeep: Get<u32>;
type WeightInfo: WeightInfo;
}

Expand Down
2 changes: 0 additions & 2 deletions bridges/snowbridge/pallets/ethereum-client/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,11 @@ parameter_types! {
epoch: 0,
}
};
pub const ExecutionHeadersPruneThreshold: u32 = 8192;
}

impl ethereum_beacon_client::Config for Test {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type MaxExecutionHeadersToKeep = ExecutionHeadersPruneThreshold;
type WeightInfo = ();
}

Expand Down
4 changes: 1 addition & 3 deletions bridges/snowbridge/pallets/inbound-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::*;

use frame_support::{
derive_impl, parameter_types,
traits::{ConstU128, ConstU32, Everything},
traits::{ConstU32, Everything},
weights::IdentityFee,
};
use hex_literal::hex;
Expand Down Expand Up @@ -88,7 +88,6 @@ impl pallet_balances::Config for Test {
}

parameter_types! {
pub const ExecutionHeadersPruneThreshold: u32 = 10;
pub const ChainForkVersions: ForkVersions = ForkVersions{
genesis: Fork {
version: [0, 0, 0, 1], // 0x00000001
Expand Down Expand Up @@ -116,7 +115,6 @@ parameter_types! {
impl snowbridge_pallet_ethereum_client::Config for Test {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type MaxExecutionHeadersToKeep = ExecutionHeadersPruneThreshold;
type WeightInfo = ();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,9 @@ parameter_types! {
};
}

parameter_types! {
pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20;
}

impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep;
type WeightInfo = weights::snowbridge_pallet_ethereum_client::WeightInfo<Runtime>;
}

Expand Down

0 comments on commit aa3a75a

Please sign in to comment.