Skip to content

Commit

Permalink
Rename constant to what bridge relayers expect
Browse files Browse the repository at this point in the history
  • Loading branch information
MRamanenkau committed Jan 17, 2024
1 parent 166ec4a commit 5203860
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pallets/chainbridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub mod pallet {
/// This must be unique and must not collide with existing IDs within a set of bridged
/// chains.
#[pallet::constant]
type ChainId: Get<ChainId>;
type ChainIdentity: Get<ChainId>;

#[pallet::constant]
type ProposalLifetime: Get<<Self as frame_system::Config>::BlockNumber>;
Expand Down Expand Up @@ -482,7 +482,7 @@ pub mod pallet {
/// Whitelist a chain ID for transfer
pub fn whitelist(id: ChainId) -> DispatchResult {
// Cannot whitelist this chain
ensure!(id != T::ChainId::get(), Error::<T>::InvalidChainId);
ensure!(id != T::ChainIdentity::get(), Error::<T>::InvalidChainId);
// Cannot whitelist with an existing entry
ensure!(!Self::chain_whitelisted(id), Error::<T>::ChainAlreadyWhitelisted);
<ChainNonces<T>>::insert(id, 0);
Expand Down
2 changes: 1 addition & 1 deletion pallets/chainbridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl crate::pallet::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = TestChainId;
type ChainIdentity = TestChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down
2 changes: 1 addition & 1 deletion pallets/erc20/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl bridge::Config for Test {
type Event = Event;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = Call;
type ChainId = TestChainId;
type ChainIdentity = TestChainId;
type ProposalLifetime = ProposalLifetime;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/cere-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ impl pallet_chainbridge::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = ChainId;
type ChainIdentity = ChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/cere/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ impl pallet_chainbridge::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = ChainId;
type ChainIdentity = ChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down

0 comments on commit 5203860

Please sign in to comment.