Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.

Commit 9122cd1

Browse files
committed
Companion of paritytech/substrate#10402 part.1
1 parent f3bc318 commit 9122cd1

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

frame/bridge/ecdsa-authority/src/mock.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use core::iter;
2121
// --- crates.io ---
2222
use libsecp256k1::{PublicKey, SecretKey};
2323
// --- paritytech ---
24-
use frame_support::traits::{Everything, GenesisBuild, OnInitialize};
24+
use frame_support::traits::{ConstU32, Everything, GenesisBuild, OnInitialize};
2525
use frame_system::mocking::*;
2626
use sp_io::{hashing, TestExternalities};
2727
use sp_runtime::{
@@ -73,7 +73,6 @@ impl frame_system::Config for Test {
7373

7474
frame_support::parameter_types! {
7575
pub const ChainId: &'static [u8] = b"46";
76-
pub const MaxAuthorities: u32 = 3;
7776
pub const MaxPendingPeriod: BlockNumber = 5;
7877
pub const SignThreshold: Perbill = Perbill::from_percent(60);
7978
pub const SyncInterval: BlockNumber = 3;
@@ -82,7 +81,7 @@ frame_support::parameter_types! {
8281
impl Config for Test {
8382
type ChainId = ChainId;
8483
type Event = Event;
85-
type MaxAuthorities = MaxAuthorities;
84+
type MaxAuthorities = ConstU32<3>;
8685
type MaxPendingPeriod = MaxPendingPeriod;
8786
type MessageRoot = MessageRoot;
8887
type SignThreshold = SignThreshold;

node/runtime/pangolin/src/pallets/ecdsa_authority.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use darwinia_message_gadget::MessageRootGetter;
77

88
frame_support::parameter_types! {
99
pub const ChainId: &'static [u8] = b"43";
10-
pub const MaxEcdsaAuthorities: u32 = 3;
1110
pub const MaxPendingPeriod: BlockNumber = 100;
1211
pub const SignThreshold: Perbill = Perbill::from_percent(60);
1312
pub const SyncInterval: BlockNumber = 10;
@@ -17,7 +16,7 @@ static_assertions::const_assert!(SyncInterval::get() < MaxPendingPeriod::get());
1716
impl Config for Runtime {
1817
type ChainId = ChainId;
1918
type Event = Event;
20-
type MaxAuthorities = MaxEcdsaAuthorities;
19+
type MaxAuthorities = ConstU32<3>;
2120
type MaxPendingPeriod = MaxPendingPeriod;
2221
type MessageRoot = MessageRootGetter<Self>;
2322
type SignThreshold = SignThreshold;

node/runtime/pangolin/src/pallets/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pub mod shared_imports;
2+
pub use shared_imports::*;
3+
14
pub mod system;
25
pub use system::*;
36

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use frame_support::traits::ConstU32;

node/runtime/pangoro/src/pallets/ecdsa_authority.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use darwinia_message_gadget::MessageRootGetter;
77

88
frame_support::parameter_types! {
99
pub const ChainId: &'static [u8] = b"45";
10-
pub const MaxEcdsaAuthorities: u32 = 3;
1110
pub const MaxPendingPeriod: BlockNumber = 100;
1211
pub const SignThreshold: Perbill = Perbill::from_percent(60);
1312
pub const SyncInterval: BlockNumber = 10;
@@ -17,7 +16,7 @@ static_assertions::const_assert!(SyncInterval::get() < MaxPendingPeriod::get());
1716
impl Config for Runtime {
1817
type ChainId = ChainId;
1918
type Event = Event;
20-
type MaxAuthorities = MaxEcdsaAuthorities;
19+
type MaxAuthorities = ConstU32<3>;
2120
type MaxPendingPeriod = MaxPendingPeriod;
2221
type MessageRoot = MessageRootGetter<Self>;
2322
type SignThreshold = SignThreshold;

node/runtime/pangoro/src/pallets/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pub mod shared_imports;
2+
pub use shared_imports::*;
3+
14
pub mod system;
25
pub use system::*;
36

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use frame_support::traits::ConstU32;

0 commit comments

Comments
 (0)