mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Fix full spellcheck (#1076)
* fix(spellcheck): test of fixing * fix(hunspell): improved many typos etc. * fix(hunspell): all errors solved * fix(hunspell): extended scope of files - the build should fail * Return error code. * Fix spelling, sort dictionary. * fix(hunspell): added fix to gitlabs check * fix(typo): one typo and test of verification on github * fix(typo): one typo Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
562fac801d
commit
f86d101d7c
@@ -18,7 +18,7 @@
|
||||
//! data. Message lane allows sending arbitrary messages between bridged chains. This
|
||||
//! module provides entrypoint that starts reading messages from given message lane
|
||||
//! of source chain and submits proof-of-message-at-source-chain transactions to the
|
||||
//! target chain. Additionaly, proofs-of-messages-delivery are sent back from the
|
||||
//! target chain. Additionally, proofs-of-messages-delivery are sent back from the
|
||||
//! target chain to the source chain.
|
||||
|
||||
// required for futures::select!
|
||||
|
||||
@@ -175,7 +175,7 @@ pub trait TargetClient<P: MessageLane>: RelayClient {
|
||||
id: TargetHeaderIdOf<P>,
|
||||
) -> Result<(TargetHeaderIdOf<P>, MessageNonce), Self::Error>;
|
||||
|
||||
/// Get nonce of latest confirmed message.
|
||||
/// Get nonce of the latest confirmed message.
|
||||
async fn latest_confirmed_received_nonce(
|
||||
&self,
|
||||
id: TargetHeaderIdOf<P>,
|
||||
@@ -218,7 +218,7 @@ pub trait TargetClient<P: MessageLane>: RelayClient {
|
||||
/// State of the client.
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
pub struct ClientState<SelfHeaderId, PeerHeaderId> {
|
||||
/// Best header id of this chain.
|
||||
/// The best header id of this chain.
|
||||
pub best_self: SelfHeaderId,
|
||||
/// Best finalized header id of this chain.
|
||||
pub best_finalized_self: SelfHeaderId,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
//! Message delivery race delivers proof-of-messages from lane.source to lane.target.
|
||||
//! Message delivery race delivers proof-of-messages from "lane.source" to "lane.target".
|
||||
|
||||
use crate::message_lane::{MessageLane, SourceHeaderIdOf, TargetHeaderIdOf};
|
||||
use crate::message_lane_loop::{
|
||||
@@ -219,7 +219,7 @@ where
|
||||
/// Additional nonces data from the target client used by message delivery race.
|
||||
#[derive(Debug, Clone)]
|
||||
struct DeliveryRaceTargetNoncesData {
|
||||
/// Latest nonce that we know: (1) has been delivered to us (2) has been confirmed
|
||||
/// The latest nonce that we know: (1) has been delivered to us (2) has been confirmed
|
||||
/// back to the source node (by confirmations race) and (3) relayer has received
|
||||
/// reward for (and this has been confirmed by the message delivery race).
|
||||
confirmed_nonce: MessageNonce,
|
||||
|
||||
@@ -76,7 +76,7 @@ pub struct SourceClientNonces<NoncesRange> {
|
||||
/// New nonces range known to the client. `New` here means all nonces generated after
|
||||
/// `prev_latest_nonce` passed to the `SourceClient::nonces` method.
|
||||
pub new_nonces: NoncesRange,
|
||||
/// Latest nonce that is confirmed to the bridged client. This nonce only makes
|
||||
/// The latest nonce that is confirmed to the bridged client. This nonce only makes
|
||||
/// sense in some races. In other races it is `None`.
|
||||
pub confirmed_nonce: Option<MessageNonce>,
|
||||
}
|
||||
@@ -84,7 +84,7 @@ pub struct SourceClientNonces<NoncesRange> {
|
||||
/// Nonces on the race target client.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TargetClientNonces<TargetNoncesData> {
|
||||
/// Latest nonce that is known to the target client.
|
||||
/// The latest nonce that is known to the target client.
|
||||
pub latest_nonce: MessageNonce,
|
||||
/// Additional data from target node that may be used by the race.
|
||||
pub nonces_data: TargetNoncesData,
|
||||
@@ -93,7 +93,7 @@ pub struct TargetClientNonces<TargetNoncesData> {
|
||||
/// One of message lane clients, which is source client for the race.
|
||||
#[async_trait]
|
||||
pub trait SourceClient<P: MessageRace> {
|
||||
/// Type of error this clients returns.
|
||||
/// Type of error these clients returns.
|
||||
type Error: std::fmt::Debug + MaybeConnectionError;
|
||||
/// Type of nonces range returned by the source client.
|
||||
type NoncesRange: NoncesRange;
|
||||
@@ -118,7 +118,7 @@ pub trait SourceClient<P: MessageRace> {
|
||||
/// One of message lane clients, which is target client for the race.
|
||||
#[async_trait]
|
||||
pub trait TargetClient<P: MessageRace> {
|
||||
/// Type of error this clients returns.
|
||||
/// Type of error these clients returns.
|
||||
type Error: std::fmt::Debug + MaybeConnectionError;
|
||||
/// Type of the additional data from the target client, used by the race.
|
||||
type TargetNoncesData: std::fmt::Debug;
|
||||
@@ -156,12 +156,12 @@ pub trait RaceStrategy<SourceHeaderId, TargetHeaderId, Proof>: Debug {
|
||||
fn is_empty(&self) -> bool;
|
||||
/// Return id of source header that is required to be on target to continue synchronization.
|
||||
fn required_source_header_at_target(&self, current_best: &SourceHeaderId) -> Option<SourceHeaderId>;
|
||||
/// Return best nonce at source node.
|
||||
/// Return the best nonce at source node.
|
||||
///
|
||||
/// `Some` is returned only if we are sure that the value is greater or equal
|
||||
/// than the result of `best_at_target`.
|
||||
fn best_at_source(&self) -> Option<MessageNonce>;
|
||||
/// Return best nonce at target node.
|
||||
/// Return the best nonce at target node.
|
||||
///
|
||||
/// May return `None` if value is yet unknown.
|
||||
fn best_at_target(&self) -> Option<MessageNonce>;
|
||||
@@ -197,7 +197,7 @@ pub struct RaceState<SourceHeaderId, TargetHeaderId, Proof> {
|
||||
/// Best finalized source header id at the best block on the target
|
||||
/// client (at the `best_finalized_source_header_id_at_best_target`).
|
||||
pub best_finalized_source_header_id_at_best_target: Option<SourceHeaderId>,
|
||||
/// Best header id at the target client.
|
||||
/// The best header id at the target client.
|
||||
pub best_target_header_id: Option<TargetHeaderId>,
|
||||
/// Best finalized header id at the target client.
|
||||
pub best_finalized_target_header_id: Option<TargetHeaderId>,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
//! Message receiving race delivers proof-of-messages-delivery from lane.target to lane.source.
|
||||
//! Message receiving race delivers proof-of-messages-delivery from "lane.target" to "lane.source".
|
||||
|
||||
use crate::message_lane::{MessageLane, SourceHeaderIdOf, TargetHeaderIdOf};
|
||||
use crate::message_lane_loop::{
|
||||
|
||||
@@ -40,7 +40,7 @@ pub struct BasicStrategy<
|
||||
> {
|
||||
/// All queued nonces.
|
||||
source_queue: SourceRangesQueue<SourceHeaderHash, SourceHeaderNumber, SourceNoncesRange>,
|
||||
/// Best nonce known to target node (at its best block). `None` if it has not been received yet.
|
||||
/// The best nonce known to target node (at its best block). `None` if it has not been received yet.
|
||||
best_target_nonce: Option<MessageNonce>,
|
||||
/// Unused generic types dump.
|
||||
_phantom: PhantomData<(TargetHeaderNumber, TargetHeaderHash, Proof)>,
|
||||
|
||||
@@ -87,21 +87,21 @@ impl MessageLaneLoopMetrics {
|
||||
.set(source_latest_generated_nonce);
|
||||
}
|
||||
|
||||
/// Update latest confirmed nonce at source.
|
||||
/// Update the latest confirmed nonce at source.
|
||||
pub fn update_source_latest_confirmed_nonce<P: MessageLane>(&self, source_latest_confirmed_nonce: MessageNonce) {
|
||||
self.lane_state_nonces
|
||||
.with_label_values(&["source_latest_confirmed"])
|
||||
.set(source_latest_confirmed_nonce);
|
||||
}
|
||||
|
||||
/// Update latest received nonce at target.
|
||||
/// Update the latest received nonce at target.
|
||||
pub fn update_target_latest_received_nonce<P: MessageLane>(&self, target_latest_generated_nonce: MessageNonce) {
|
||||
self.lane_state_nonces
|
||||
.with_label_values(&["target_latest_received"])
|
||||
.set(target_latest_generated_nonce);
|
||||
}
|
||||
|
||||
/// Update latest confirmed nonce at target.
|
||||
/// Update the latest confirmed nonce at target.
|
||||
pub fn update_target_latest_confirmed_nonce<P: MessageLane>(&self, target_latest_confirmed_nonce: MessageNonce) {
|
||||
self.lane_state_nonces
|
||||
.with_label_values(&["target_latest_confirmed"])
|
||||
|
||||
Reference in New Issue
Block a user