Rename Finality Verifier and Call Dispatch Pallets (#838)

* Rename `pallet-finality-verifier` to `pallet-bridge-grandpa`

* Missed some CamelCase ones

* Update logging target in GRANDPA pallet

* Rename `pallet-bridge-call-dispatch` to `pallet-bridge-dispatch`

* Rename the dispatch pallet folder

* Update logging target in Dispatch pallet

* Missed a couple

* Format the repo

* Stop listing individual pallets in Compose logs

* Use correct pallet name in module doc comments

* Add `pallet-bridge-dispatch` to README project layout

* Sort crate names in TOML files

* Rename `pallet-bridge-grandpa` runtime Call alias
This commit is contained in:
Hernando Castano
2021-03-23 11:37:41 -04:00
committed by Bastian Köcher
parent acb872fbb0
commit 8d122b03f1
26 changed files with 165 additions and 160 deletions
+11 -11
View File
@@ -70,8 +70,8 @@ pub use frame_system::Call as SystemCall;
pub use pallet_balances::Call as BalancesCall;
pub use pallet_bridge_currency_exchange::Call as BridgeCurrencyExchangeCall;
pub use pallet_bridge_eth_poa::Call as BridgeEthPoACall;
pub use pallet_bridge_grandpa::Call as BridgeGrandpaMillauCall;
pub use pallet_bridge_messages::Call as MessagesCall;
pub use pallet_finality_verifier::Call as FinalityBridgeMillauCall;
pub use pallet_substrate_bridge::Call as BridgeMillauCall;
pub use pallet_sudo::Call as SudoCall;
pub use pallet_timestamp::Call as TimestampCall;
@@ -257,7 +257,7 @@ impl pallet_bridge_currency_exchange::Config<KovanCurrencyExchange> for Runtime
type DepositInto = DepositInto;
}
impl pallet_bridge_call_dispatch::Config for Runtime {
impl pallet_bridge_dispatch::Config for Runtime {
type Event = Event;
type MessageId = (bp_messages::LaneId, bp_messages::MessageNonce);
type Call = Call;
@@ -419,7 +419,7 @@ parameter_types! {
pub const MaxRequests: u32 = 50;
}
impl pallet_finality_verifier::Config for Runtime {
impl pallet_bridge_grandpa::Config for Runtime {
type BridgedChain = bp_millau::Millau;
type MaxRequests = MaxRequests;
}
@@ -480,8 +480,8 @@ construct_runtime!(
BridgeRialtoCurrencyExchange: pallet_bridge_currency_exchange::<Instance1>::{Module, Call},
BridgeKovanCurrencyExchange: pallet_bridge_currency_exchange::<Instance2>::{Module, Call},
BridgeMillau: pallet_substrate_bridge::{Module, Call, Storage, Config<T>},
BridgeFinalityVerifier: pallet_finality_verifier::{Module, Call},
BridgeCallDispatch: pallet_bridge_call_dispatch::{Module, Event<T>},
BridgeGrandpa: pallet_bridge_grandpa::{Module, Call},
BridgeDispatch: pallet_bridge_dispatch::{Module, Event<T>},
BridgeMillauMessages: pallet_bridge_messages::{Module, Call, Storage, Event<T>},
System: frame_system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
@@ -643,12 +643,12 @@ impl_runtime_apis! {
impl bp_millau::MillauFinalityApi<Block> for Runtime {
fn best_finalized() -> (bp_millau::BlockNumber, bp_millau::Hash) {
let header = BridgeFinalityVerifier::best_finalized();
let header = BridgeGrandpa::best_finalized();
(header.number, header.hash())
}
fn is_known_header(hash: bp_millau::Hash) -> bool {
BridgeFinalityVerifier::is_known_header(hash)
BridgeGrandpa::is_known_header(hash)
}
}
@@ -890,7 +890,7 @@ impl_runtime_apis! {
params: MessageParams<Self::AccountId>,
) -> (millau_messages::ToMillauMessagePayload, Balance) {
let message_payload = vec![0; params.size as usize];
let dispatch_origin = pallet_bridge_call_dispatch::CallOrigin::SourceAccount(
let dispatch_origin = pallet_bridge_dispatch::CallOrigin::SourceAccount(
params.sender_account,
);
@@ -959,10 +959,10 @@ impl_runtime_apis! {
make_millau_outbound_lane_data_key,
make_millau_header,
call_weight,
pallet_bridge_call_dispatch::MessagePayload {
pallet_bridge_dispatch::MessagePayload {
spec_version: VERSION.spec_version,
weight: call_weight,
origin: pallet_bridge_call_dispatch::CallOrigin::<
origin: pallet_bridge_dispatch::CallOrigin::<
bp_millau::AccountId,
MultiSigner,
Signature,
@@ -1040,7 +1040,7 @@ where
AccountId: codec::Encode,
SpecVersion: codec::Encode,
{
pallet_bridge_call_dispatch::account_ownership_digest(
pallet_bridge_dispatch::account_ownership_digest(
millau_call,
rialto_account_id,
millau_spec_version,