diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index fdaa0c8628f7..4fc5b97caae0 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -13,7 +13,7 @@
# - Multiple owners are supported.
# - Either handle (e.g, @github_user or @github/team) or email can be used. Keep in mind,
# that handles might work better because they are more recognizable on GitHub,
-# eyou can use them for mentioning unlike an email.
+# you can use them for mentioning unlike an email.
# - The latest matching rule, if multiple, takes precedence.
# CI
diff --git a/.github/scripts/common/lib.sh b/.github/scripts/common/lib.sh
index 29dc269ffd23..932a6d546c37 100755
--- a/.github/scripts/common/lib.sh
+++ b/.github/scripts/common/lib.sh
@@ -237,7 +237,7 @@ fetch_release_artifacts() {
popd > /dev/null
}
-# Fetch the release artifacts like binary and sigantures from S3. Assumes the ENV are set:
+# Fetch the release artifacts like binary and signatures from S3. Assumes the ENV are set:
# - RELEASE_ID
# - GITHUB_TOKEN
# - REPO in the form paritytech/polkadot
diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml
index f8de61355725..44d66eb2f5eb 100644
--- a/.gitlab/pipeline/build.yml
+++ b/.gitlab/pipeline/build.yml
@@ -350,7 +350,7 @@ build-runtimes-polkavm:
- .run-immediately
# - .collect-artifact
variables:
- # this variable gets overriden by "rusty-cachier environment inject", use the value as default
+ # this variable gets overridden by "rusty-cachier environment inject", use the value as default
CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target"
before_script:
- mkdir -p ./artifacts/subkey
diff --git a/.gitlab/rust-features.sh b/.gitlab/rust-features.sh
index c0ac192a6ec6..c3ec61ab8714 100755
--- a/.gitlab/rust-features.sh
+++ b/.gitlab/rust-features.sh
@@ -15,7 +15,7 @@
#
# The steps of this script:
# 1. Check that all required dependencies are installed.
-# 2. Check that all rules are fullfilled for the whole workspace. If not:
+# 2. Check that all rules are fulfilled for the whole workspace. If not:
# 4. Check all crates to find the offending ones.
# 5. Print all offending crates and exit with code 1.
#
diff --git a/bridges/bin/runtime-common/src/messages_api.rs b/bridges/bin/runtime-common/src/messages_api.rs
index ccf1c754041e..7fbdeb366124 100644
--- a/bridges/bin/runtime-common/src/messages_api.rs
+++ b/bridges/bin/runtime-common/src/messages_api.rs
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see .
-//! Helpers for implementing various message-related runtime API mthods.
+//! Helpers for implementing various message-related runtime API methods.
use bp_messages::{
InboundMessageDetails, LaneId, MessageNonce, MessagePayload, OutboundMessageDetails,
diff --git a/bridges/bin/runtime-common/src/messages_xcm_extension.rs b/bridges/bin/runtime-common/src/messages_xcm_extension.rs
index e3da6155f08a..46ed4da0d854 100644
--- a/bridges/bin/runtime-common/src/messages_xcm_extension.rs
+++ b/bridges/bin/runtime-common/src/messages_xcm_extension.rs
@@ -248,7 +248,7 @@ impl LocalXcmQueueManager {
sender_and_lane: &SenderAndLane,
enqueued_messages: MessageNonce,
) {
- // skip if we dont want to handle congestion
+ // skip if we don't want to handle congestion
if !H::supports_congestion_detection() {
return
}
diff --git a/bridges/bin/runtime-common/src/mock.rs b/bridges/bin/runtime-common/src/mock.rs
index deee4524e858..8c4cb2233e17 100644
--- a/bridges/bin/runtime-common/src/mock.rs
+++ b/bridges/bin/runtime-common/src/mock.rs
@@ -379,7 +379,7 @@ impl Chain for BridgedUnderlyingChain {
impl ChainWithGrandpa for BridgedUnderlyingChain {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = "";
const MAX_AUTHORITIES_COUNT: u32 = 16;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 = 8;
const MAX_MANDATORY_HEADER_SIZE: u32 = 256;
const AVERAGE_HEADER_SIZE: u32 = 64;
}
diff --git a/bridges/bin/runtime-common/src/priority_calculator.rs b/bridges/bin/runtime-common/src/priority_calculator.rs
index c2737128e342..5035553f508d 100644
--- a/bridges/bin/runtime-common/src/priority_calculator.rs
+++ b/bridges/bin/runtime-common/src/priority_calculator.rs
@@ -163,7 +163,7 @@ mod integrity_tests {
{
// just an estimation of extra transaction bytes that are added to every transaction
// (including signature, signed extensions extra and etc + in our case it includes
- // all call arguments extept the proof itself)
+ // all call arguments except the proof itself)
let base_tx_size = 512;
// let's say we are relaying similar small messages and for every message we add more trie
// nodes to the proof (x0.5 because we expect some nodes to be reused)
diff --git a/bridges/bin/runtime-common/src/refund_relayer_extension.rs b/bridges/bin/runtime-common/src/refund_relayer_extension.rs
index 8e901d72821f..455392a0a277 100644
--- a/bridges/bin/runtime-common/src/refund_relayer_extension.rs
+++ b/bridges/bin/runtime-common/src/refund_relayer_extension.rs
@@ -1538,7 +1538,7 @@ mod tests {
}
#[test]
- fn validate_boosts_priority_of_message_delivery_transactons() {
+ fn validate_boosts_priority_of_message_delivery_transactions() {
run_test(|| {
initialize_environment(100, 100, 100);
@@ -1568,7 +1568,7 @@ mod tests {
}
#[test]
- fn validate_does_not_boost_priority_of_message_delivery_transactons_with_too_many_messages() {
+ fn validate_does_not_boost_priority_of_message_delivery_transactions_with_too_many_messages() {
run_test(|| {
initialize_environment(100, 100, 100);
diff --git a/bridges/chains/chain-kusama/src/lib.rs b/bridges/chains/chain-kusama/src/lib.rs
index e3b4d0520f61..a81004afe812 100644
--- a/bridges/chains/chain-kusama/src/lib.rs
+++ b/bridges/chains/chain-kusama/src/lib.rs
@@ -53,8 +53,8 @@ impl Chain for Kusama {
impl ChainWithGrandpa for Kusama {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_KUSAMA_GRANDPA_PALLET_NAME;
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
- REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 =
+ REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
diff --git a/bridges/chains/chain-polkadot-bulletin/src/lib.rs b/bridges/chains/chain-polkadot-bulletin/src/lib.rs
index f2eebf931247..f3d300567f2b 100644
--- a/bridges/chains/chain-polkadot-bulletin/src/lib.rs
+++ b/bridges/chains/chain-polkadot-bulletin/src/lib.rs
@@ -43,7 +43,7 @@ use sp_runtime::{traits::DispatchInfoOf, transaction_validity::TransactionValidi
pub use bp_polkadot_core::{
AccountAddress, AccountId, Balance, Block, BlockNumber, Hash, Hasher, Header, Nonce, Signature,
SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE, EXTRA_STORAGE_PROOF_SIZE,
- MAX_MANDATORY_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY,
+ MAX_MANDATORY_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY,
};
/// Maximal number of GRANDPA authorities at Polkadot Bulletin chain.
@@ -62,7 +62,7 @@ const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(90);
// Re following constants - we are using the same values at Cumulus parachains. They are limited
// by the maximal transaction weight/size. Since block limits at Bulletin Chain are larger than
-// at the Cumulus Bridgeg Hubs, we could reuse the same values.
+// at the Cumulus Bridge Hubs, we could reuse the same values.
/// Maximal number of unrewarded relayer entries at inbound lane for Cumulus-based parachains.
pub const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 1024;
@@ -207,8 +207,8 @@ impl Chain for PolkadotBulletin {
impl ChainWithGrandpa for PolkadotBulletin {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_POLKADOT_BULLETIN_GRANDPA_PALLET_NAME;
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
- REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 =
+ REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
diff --git a/bridges/chains/chain-polkadot/src/lib.rs b/bridges/chains/chain-polkadot/src/lib.rs
index fc5e10308a8e..00d35783a9b6 100644
--- a/bridges/chains/chain-polkadot/src/lib.rs
+++ b/bridges/chains/chain-polkadot/src/lib.rs
@@ -55,8 +55,8 @@ impl Chain for Polkadot {
impl ChainWithGrandpa for Polkadot {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_POLKADOT_GRANDPA_PALLET_NAME;
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
- REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 =
+ REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
diff --git a/bridges/chains/chain-rococo/src/lib.rs b/bridges/chains/chain-rococo/src/lib.rs
index f1b256f0f090..2385dd2cbb25 100644
--- a/bridges/chains/chain-rococo/src/lib.rs
+++ b/bridges/chains/chain-rococo/src/lib.rs
@@ -53,8 +53,8 @@ impl Chain for Rococo {
impl ChainWithGrandpa for Rococo {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_ROCOCO_GRANDPA_PALLET_NAME;
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
- REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 =
+ REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
diff --git a/bridges/chains/chain-westend/src/lib.rs b/bridges/chains/chain-westend/src/lib.rs
index f03fd2160a70..b344b7f4bf93 100644
--- a/bridges/chains/chain-westend/src/lib.rs
+++ b/bridges/chains/chain-westend/src/lib.rs
@@ -53,8 +53,8 @@ impl Chain for Westend {
impl ChainWithGrandpa for Westend {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_WESTEND_GRANDPA_PALLET_NAME;
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
- REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 =
+ REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
diff --git a/bridges/modules/grandpa/README.md b/bridges/modules/grandpa/README.md
index 992bd2cc4722..4a3099b8afc6 100644
--- a/bridges/modules/grandpa/README.md
+++ b/bridges/modules/grandpa/README.md
@@ -10,7 +10,7 @@ It is used by the parachains light client (bridge parachains pallet) and by mess
## A Brief Introduction into GRANDPA Finality
You can find detailed information on GRANDPA, by exploring its [repository](https://github.com/paritytech/finality-grandpa).
-Here is the minimal reqiuired GRANDPA information to understand how pallet works.
+Here is the minimal required GRANDPA information to understand how pallet works.
Any Substrate chain may use different block authorship algorithms (like BABE or Aura) to determine block producers and
generate blocks. This has nothing common with finality, though - the task of block authorship is to coordinate
diff --git a/bridges/modules/grandpa/src/call_ext.rs b/bridges/modules/grandpa/src/call_ext.rs
index e3c778b480ba..4a7ebb3cc8d4 100644
--- a/bridges/modules/grandpa/src/call_ext.rs
+++ b/bridges/modules/grandpa/src/call_ext.rs
@@ -205,7 +205,7 @@ pub(crate) fn submit_finality_proof_info_from_args, I: 'static>(
// as an extra weight.
let votes_ancestries_len = justification.votes_ancestries.len().saturated_into();
let extra_weight =
- if votes_ancestries_len > T::BridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY {
+ if votes_ancestries_len > T::BridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY {
T::WeightInfo::submit_finality_proof(precommits_len, votes_ancestries_len)
} else {
Weight::zero()
@@ -396,11 +396,11 @@ mod tests {
let finality_target = test_header(1);
let mut justification_params = JustificationGeneratorParams {
header: finality_target.clone(),
- ancestors: TestBridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY,
+ ancestors: TestBridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY,
..Default::default()
};
- // when there are `REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY` headers => no refund
+ // when there are `REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY` headers => no refund
let justification = make_justification_for_header(justification_params.clone());
let call = RuntimeCall::Grandpa(crate::Call::submit_finality_proof_ex {
finality_target: Box::new(finality_target.clone()),
@@ -409,7 +409,7 @@ mod tests {
});
assert_eq!(call.submit_finality_proof_info().unwrap().extra_weight, Weight::zero());
- // when there are `REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY + 1` headers => full refund
+ // when there are `REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY + 1` headers => full refund
justification_params.ancestors += 1;
let justification = make_justification_for_header(justification_params);
let call_weight = ::WeightInfo::submit_finality_proof(
diff --git a/bridges/modules/grandpa/src/lib.rs b/bridges/modules/grandpa/src/lib.rs
index ce2c47da954f..9e095651ef81 100644
--- a/bridges/modules/grandpa/src/lib.rs
+++ b/bridges/modules/grandpa/src/lib.rs
@@ -935,7 +935,7 @@ mod tests {
}
#[test]
- fn succesfully_imports_header_with_valid_finality() {
+ fn successfully_imports_header_with_valid_finality() {
run_test(|| {
initialize_substrate_bridge();
@@ -1192,7 +1192,7 @@ mod tests {
header.digest = change_log(0);
let justification = make_justification_for_header(JustificationGeneratorParams {
header: header.clone(),
- ancestors: TestBridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY + 1,
+ ancestors: TestBridgedChain::REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY + 1,
..Default::default()
});
diff --git a/bridges/modules/grandpa/src/mock.rs b/bridges/modules/grandpa/src/mock.rs
index 4318d663a2e1..e689e520c92f 100644
--- a/bridges/modules/grandpa/src/mock.rs
+++ b/bridges/modules/grandpa/src/mock.rs
@@ -87,7 +87,7 @@ impl Chain for TestBridgedChain {
impl ChainWithGrandpa for TestBridgedChain {
const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = "";
const MAX_AUTHORITIES_COUNT: u32 = MAX_BRIDGED_AUTHORITIES;
- const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
+ const REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY: u32 = 8;
const MAX_MANDATORY_HEADER_SIZE: u32 = 256;
const AVERAGE_HEADER_SIZE: u32 = 64;
}
diff --git a/bridges/modules/messages/src/inbound_lane.rs b/bridges/modules/messages/src/inbound_lane.rs
index 966ec939e70e..da1698e6e037 100644
--- a/bridges/modules/messages/src/inbound_lane.rs
+++ b/bridges/modules/messages/src/inbound_lane.rs
@@ -21,7 +21,7 @@ use crate::Config;
use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
DeliveredMessages, InboundLaneData, LaneId, MessageKey, MessageNonce, OutboundLaneData,
- ReceivalResult, UnrewardedRelayer,
+ ReceptionResult, UnrewardedRelayer,
};
use codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
use frame_support::traits::Get;
@@ -170,21 +170,21 @@ impl InboundLane {
relayer_at_bridged_chain: &S::Relayer,
nonce: MessageNonce,
message_data: DispatchMessageData,
- ) -> ReceivalResult {
+ ) -> ReceptionResult {
let mut data = self.storage.get_or_init_data();
if Some(nonce) != data.last_delivered_nonce().checked_add(1) {
- return ReceivalResult::InvalidNonce
+ return ReceptionResult::InvalidNonce
}
// if there are more unrewarded relayer entries than we may accept, reject this message
if data.relayers.len() as MessageNonce >= self.storage.max_unrewarded_relayer_entries() {
- return ReceivalResult::TooManyUnrewardedRelayers
+ return ReceptionResult::TooManyUnrewardedRelayers
}
// if there are more unconfirmed messages than we may accept, reject this message
let unconfirmed_messages_count = nonce.saturating_sub(data.last_confirmed_nonce);
if unconfirmed_messages_count > self.storage.max_unconfirmed_messages() {
- return ReceivalResult::TooManyUnconfirmedMessages
+ return ReceptionResult::TooManyUnconfirmedMessages
}
// then, dispatch message
@@ -207,7 +207,7 @@ impl InboundLane {
};
self.storage.set_data(data);
- ReceivalResult::Dispatched(dispatch_result)
+ ReceptionResult::Dispatched(dispatch_result)
}
}
@@ -235,7 +235,7 @@ mod tests {
nonce,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
}
@@ -362,7 +362,7 @@ mod tests {
10,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::InvalidNonce
+ ReceptionResult::InvalidNonce
);
assert_eq!(lane.storage.get_or_init_data().last_delivered_nonce(), 0);
});
@@ -381,7 +381,7 @@ mod tests {
current_nonce,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
}
// Fails to dispatch new message from different than latest relayer.
@@ -391,7 +391,7 @@ mod tests {
max_nonce + 1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::TooManyUnrewardedRelayers,
+ ReceptionResult::TooManyUnrewardedRelayers,
);
// Fails to dispatch new messages from latest relayer. Prevents griefing attacks.
assert_eq!(
@@ -400,7 +400,7 @@ mod tests {
max_nonce + 1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::TooManyUnrewardedRelayers,
+ ReceptionResult::TooManyUnrewardedRelayers,
);
});
}
@@ -417,7 +417,7 @@ mod tests {
current_nonce,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
}
// Fails to dispatch new message from different than latest relayer.
@@ -427,7 +427,7 @@ mod tests {
max_nonce + 1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::TooManyUnconfirmedMessages,
+ ReceptionResult::TooManyUnconfirmedMessages,
);
// Fails to dispatch new messages from latest relayer.
assert_eq!(
@@ -436,7 +436,7 @@ mod tests {
max_nonce + 1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::TooManyUnconfirmedMessages,
+ ReceptionResult::TooManyUnconfirmedMessages,
);
});
}
@@ -451,7 +451,7 @@ mod tests {
1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
assert_eq!(
lane.receive_message::(
@@ -459,7 +459,7 @@ mod tests {
2,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
assert_eq!(
lane.receive_message::(
@@ -467,7 +467,7 @@ mod tests {
3,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
assert_eq!(
lane.storage.get_or_init_data().relayers,
@@ -490,7 +490,7 @@ mod tests {
1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::Dispatched(dispatch_result(0))
+ ReceptionResult::Dispatched(dispatch_result(0))
);
assert_eq!(
lane.receive_message::(
@@ -498,7 +498,7 @@ mod tests {
1,
inbound_message_data(REGULAR_PAYLOAD)
),
- ReceivalResult::InvalidNonce,
+ ReceptionResult::InvalidNonce,
);
});
}
@@ -524,7 +524,7 @@ mod tests {
1,
inbound_message_data(payload)
),
- ReceivalResult::Dispatched(dispatch_result(1))
+ ReceptionResult::Dispatched(dispatch_result(1))
);
});
}
diff --git a/bridges/modules/messages/src/lib.rs b/bridges/modules/messages/src/lib.rs
index a86cb326cf04..bc00db9eba5b 100644
--- a/bridges/modules/messages/src/lib.rs
+++ b/bridges/modules/messages/src/lib.rs
@@ -47,7 +47,7 @@ pub use weights_ext::{
use crate::{
inbound_lane::{InboundLane, InboundLaneStorage},
- outbound_lane::{OutboundLane, OutboundLaneStorage, ReceivalConfirmationError},
+ outbound_lane::{OutboundLane, OutboundLaneStorage, ReceptionConfirmationError},
};
use bp_messages::{
@@ -90,7 +90,7 @@ pub const LOG_TARGET: &str = "runtime::bridge-messages";
#[frame_support::pallet]
pub mod pallet {
use super::*;
- use bp_messages::{ReceivalResult, ReceivedMessages};
+ use bp_messages::{ReceivedMessages, ReceptionResult};
use bp_runtime::RangeInclusiveExt;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
@@ -376,13 +376,13 @@ pub mod pallet {
// delivery transaction cost anyway. And base cost covers everything except
// dispatch, so we have a balance here.
let unspent_weight = match &receival_result {
- ReceivalResult::Dispatched(dispatch_result) => {
+ ReceptionResult::Dispatched(dispatch_result) => {
valid_messages += 1;
dispatch_result.unspent_weight
},
- ReceivalResult::InvalidNonce |
- ReceivalResult::TooManyUnrewardedRelayers |
- ReceivalResult::TooManyUnconfirmedMessages => message_dispatch_weight,
+ ReceptionResult::InvalidNonce |
+ ReceptionResult::TooManyUnrewardedRelayers |
+ ReceptionResult::TooManyUnconfirmedMessages => message_dispatch_weight,
};
lane_messages_received_status.push(message.key.nonce, receival_result);
@@ -455,7 +455,7 @@ pub mod pallet {
last_delivered_nonce,
&lane_data.relayers,
)
- .map_err(Error::::ReceivalConfirmation)?;
+ .map_err(Error::::ReceptionConfirmation)?;
if let Some(confirmed_messages) = confirmed_messages {
// emit 'delivered' event
@@ -563,7 +563,7 @@ pub mod pallet {
/// The message someone is trying to work with (i.e. increase fee) is not yet sent.
MessageIsNotYetSent,
/// Error confirming messages receival.
- ReceivalConfirmation(ReceivalConfirmationError),
+ ReceptionConfirmation(ReceptionConfirmationError),
/// Error generated by the `OwnedBridgeModule` trait.
BridgeModule(bp_runtime::OwnedBridgeModuleError),
}
@@ -923,7 +923,7 @@ mod tests {
PAYLOAD_REJECTED_BY_TARGET_CHAIN, REGULAR_PAYLOAD, TEST_LANE_ID, TEST_LANE_ID_2,
TEST_LANE_ID_3, TEST_RELAYER_A, TEST_RELAYER_B,
},
- outbound_lane::ReceivalConfirmationError,
+ outbound_lane::ReceptionConfirmationError,
};
use bp_messages::{
source_chain::MessagesBridge, BridgeMessagesCall, UnrewardedRelayer,
@@ -950,11 +950,11 @@ mod tests {
let outbound_lane = outbound_lane::(lane_id);
let message_nonce = outbound_lane.data().latest_generated_nonce + 1;
- let prev_enqueud_messages = outbound_lane.data().queued_messages().saturating_len();
+ let prev_enqueued_messages = outbound_lane.data().queued_messages().saturating_len();
let valid_message = Pallet::::validate_message(lane_id, ®ULAR_PAYLOAD)
.expect("validate_message has failed");
let artifacts = Pallet::::send_message(valid_message);
- assert_eq!(artifacts.enqueued_messages, prev_enqueud_messages + 1);
+ assert_eq!(artifacts.enqueued_messages, prev_enqueued_messages + 1);
// check event with assigned nonce
assert_eq!(
@@ -1541,7 +1541,7 @@ mod tests {
}
#[test]
- fn actual_dispatch_weight_does_not_overlow() {
+ fn actual_dispatch_weight_does_not_overflow() {
run_test(|| {
let message1 = message(1, message_payload(0, u64::MAX / 2));
let message2 = message(2, message_payload(0, u64::MAX / 2));
@@ -1775,7 +1775,7 @@ mod tests {
// returns `last_confirmed_nonce`;
// 3) it means that we're going to confirm delivery of messages 1..=1;
// 4) so the number of declared messages (see `UnrewardedRelayersState`) is `0` and
- // numer of actually confirmed messages is `1`.
+ // number of actually confirmed messages is `1`.
assert_noop!(
Pallet::::receive_messages_delivery_proof(
RuntimeOrigin::signed(1),
@@ -1785,8 +1785,8 @@ mod tests {
))),
UnrewardedRelayersState { last_delivered_nonce: 1, ..Default::default() },
),
- Error::::ReceivalConfirmation(
- ReceivalConfirmationError::TryingToConfirmMoreMessagesThanExpected
+ Error::::ReceptionConfirmation(
+ ReceptionConfirmationError::TryingToConfirmMoreMessagesThanExpected
),
);
});
diff --git a/bridges/modules/messages/src/outbound_lane.rs b/bridges/modules/messages/src/outbound_lane.rs
index 431c2cfb7eef..acef5546d2a6 100644
--- a/bridges/modules/messages/src/outbound_lane.rs
+++ b/bridges/modules/messages/src/outbound_lane.rs
@@ -53,7 +53,7 @@ pub type StoredMessagePayload = BoundedVec>::MaximalOu
/// Result of messages receival confirmation.
#[derive(Encode, Decode, RuntimeDebug, PartialEq, Eq, PalletError, TypeInfo)]
-pub enum ReceivalConfirmationError {
+pub enum ReceptionConfirmationError {
/// Bridged chain is trying to confirm more messages than we have generated. May be a result
/// of invalid bridged chain storage.
FailedToConfirmFutureMessages,
@@ -103,7 +103,7 @@ impl OutboundLane {
max_allowed_messages: MessageNonce,
latest_delivered_nonce: MessageNonce,
relayers: &VecDeque>,
- ) -> Result