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
@@ -41,7 +41,7 @@ type RpcResult<T> = std::result::Result<T, RpcError>;
|
||||
/// interactions involving, for example, an Ethereum contract.
|
||||
#[async_trait]
|
||||
pub trait EthereumHighLevelRpc {
|
||||
/// Returns best Substrate block that PoA chain knows of.
|
||||
/// Returns the best Substrate block that PoA chain knows of.
|
||||
async fn best_substrate_block(&self, contract_address: Address) -> RpcResult<RialtoHeaderId>;
|
||||
|
||||
/// Returns true if Substrate header is known to Ethereum node.
|
||||
|
||||
@@ -41,13 +41,13 @@ type RpcResult<T> = std::result::Result<T, RpcError>;
|
||||
/// interactions involving, for example, an Ethereum bridge module.
|
||||
#[async_trait]
|
||||
pub trait SubstrateHighLevelRpc {
|
||||
/// Returns best Ethereum block that Substrate runtime knows of.
|
||||
/// Returns the best Ethereum block that Substrate runtime knows of.
|
||||
async fn best_ethereum_block(&self) -> RpcResult<EthereumHeaderId>;
|
||||
/// Returns best finalized Ethereum block that Substrate runtime knows of.
|
||||
async fn best_ethereum_finalized_block(&self) -> RpcResult<EthereumHeaderId>;
|
||||
/// Returns whether or not transactions receipts are required for Ethereum header submission.
|
||||
/// Returns whether transactions receipts are required for Ethereum header submission.
|
||||
async fn ethereum_receipts_required(&self, header: SubstrateEthereumHeader) -> RpcResult<bool>;
|
||||
/// Returns whether or not the given Ethereum header is known to the Substrate runtime.
|
||||
/// Returns whether the given Ethereum header is known to the Substrate runtime.
|
||||
async fn ethereum_header_known(&self, header_id: EthereumHeaderId) -> RpcResult<bool>;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::cli::{
|
||||
|
||||
/// Weight of the `system::remark` call at Rococo.
|
||||
///
|
||||
/// This weight is larger (x2) than actual weight at current Rooco runtime to avoid unsuccessful
|
||||
/// This weight is larger (x2) than actual weight at current Rococo runtime to avoid unsuccessful
|
||||
/// calls in the future. But since it is used only in tests (and on test chains), this is ok.
|
||||
pub(crate) const SYSTEM_REMARK_CALL_WEIGHT: Weight = 2 * 1_345_000;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ use strum::VariantNames;
|
||||
/// since messages sent over the bridge will be able to spend these.
|
||||
#[derive(StructOpt)]
|
||||
pub struct DeriveAccount {
|
||||
/// A bridge instance to initalize.
|
||||
/// A bridge instance to initialize.
|
||||
#[structopt(possible_values = FullBridge::VARIANTS, case_insensitive = true)]
|
||||
bridge: FullBridge,
|
||||
/// Source-chain address to derive Target-chain address from.
|
||||
|
||||
@@ -41,7 +41,7 @@ pub enum MessagePayload {
|
||||
/// A `MessagePayload` to encode.
|
||||
#[derive(StructOpt)]
|
||||
pub struct EncodeMessage {
|
||||
/// A bridge instance to initalize.
|
||||
/// A bridge instance to initialize.
|
||||
#[structopt(possible_values = FullBridge::VARIANTS, case_insensitive = true)]
|
||||
bridge: FullBridge,
|
||||
#[structopt(flatten)]
|
||||
|
||||
@@ -26,7 +26,7 @@ use strum::{EnumString, EnumVariantNames, VariantNames};
|
||||
/// Initialize bridge pallet.
|
||||
#[derive(StructOpt)]
|
||||
pub struct InitBridge {
|
||||
/// A bridge instance to initalize.
|
||||
/// A bridge instance to initialize.
|
||||
#[structopt(possible_values = InitBridgeName::VARIANTS, case_insensitive = true)]
|
||||
bridge: InitBridgeName,
|
||||
#[structopt(flatten)]
|
||||
|
||||
@@ -235,7 +235,7 @@ pub trait CliChain: relay_substrate_client::Chain {
|
||||
|
||||
/// Bridge Message Payload type.
|
||||
///
|
||||
/// TODO [#854] This should be removed in favour of target-specifc types.
|
||||
/// TODO [#854] This should be removed in favor of target-specifc types.
|
||||
type MessagePayload;
|
||||
|
||||
/// Numeric value of SS58 format.
|
||||
@@ -354,7 +354,7 @@ where
|
||||
}
|
||||
|
||||
/// Create chain-specific set of configuration objects: connection parameters,
|
||||
/// signing parameters and bridge initialisation parameters.
|
||||
/// signing parameters and bridge initialization parameters.
|
||||
#[macro_export]
|
||||
macro_rules! declare_chain_options {
|
||||
($chain:ident, $chain_prefix:ident) => {
|
||||
|
||||
@@ -35,7 +35,7 @@ use strum::{EnumString, EnumVariantNames, VariantNames};
|
||||
#[derive(Debug, EnumString, EnumVariantNames, Clone, Copy, PartialEq, Eq)]
|
||||
#[strum(serialize_all = "kebab_case")]
|
||||
pub enum DispatchFeePayment {
|
||||
/// The dispacth fee is paid at the source chain.
|
||||
/// The dispatch fee is paid at the source chain.
|
||||
AtSourceChain,
|
||||
/// The dispatch fee is paid at the target chain.
|
||||
AtTargetChain,
|
||||
|
||||
@@ -49,7 +49,7 @@ pub trait SubstrateFinalitySyncPipeline: FinalitySyncPipeline {
|
||||
/// Start finality relay guards.
|
||||
///
|
||||
/// Different finality bridges may have different set of guards - e.g. on ephemeral chains we
|
||||
/// don't need version guards, on test chains we don't care that much about relayer account
|
||||
/// don't need a version guards, on test chains we don't care that much about relayer account
|
||||
/// balance, ... So the implementation is left to the specific bridges.
|
||||
fn start_relay_guards(&self) {}
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@ pub trait SubstrateMessageLane: MessageLane {
|
||||
|
||||
/// Name of the runtime method that returns latest received nonce at the target chain.
|
||||
const INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str;
|
||||
/// Name of the runtime method that returns latest confirmed (reward-paid) nonce at the target chain.
|
||||
/// Name of the runtime method that returns the latest confirmed (reward-paid) nonce at the target chain.
|
||||
const INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD: &'static str;
|
||||
/// Numebr of the runtime method that returns state of "unrewarded relayers" set at the target chain.
|
||||
/// Number of the runtime method that returns state of "unrewarded relayers" set at the target chain.
|
||||
const INBOUND_LANE_UNREWARDED_RELAYERS_STATE: &'static str;
|
||||
|
||||
/// Name of the runtime method that returns id of best finalized source header at target chain.
|
||||
|
||||
@@ -248,7 +248,7 @@ async fn background_task<SourceChain, TargetChain, TargetSign>(
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `Some()` with inclusive range of headers which must be scanned for manadatory headers
|
||||
/// Returns `Some()` with inclusive range of headers which must be scanned for mandatory headers
|
||||
/// and the first of such headers must be submitted to the target node.
|
||||
async fn mandatory_headers_scan_range<C: Chain>(
|
||||
best_finalized_source_header_at_source: Option<C::BlockNumber>,
|
||||
|
||||
@@ -47,7 +47,7 @@ impl Default for SigningParams {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sign and submit tranaction using given Ethereum client.
|
||||
/// Sign and submit transaction using given Ethereum client.
|
||||
pub async fn sign_and_submit_transaction(
|
||||
client: &Client,
|
||||
params: &SigningParams,
|
||||
|
||||
@@ -61,7 +61,7 @@ where
|
||||
/// All entries here (like pretty much in the entire file) must be kept in sync with Rococo
|
||||
/// `construct_runtime`, so that we maintain SCALE-compatibility.
|
||||
///
|
||||
/// See: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs
|
||||
/// See: [link](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs)
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
|
||||
pub enum Call {
|
||||
|
||||
@@ -61,7 +61,7 @@ pub trait Chain: ChainBase + Clone {
|
||||
type Call: Dispatchable + Debug;
|
||||
/// Balance of an account in native tokens.
|
||||
///
|
||||
/// The chain may suport multiple tokens, but this particular type is for token that is used
|
||||
/// The chain may support multiple tokens, but this particular type is for token that is used
|
||||
/// to pay for transaction dispatch, to reward different relayers (headers, messages), etc.
|
||||
type Balance: AtLeast32BitUnsigned
|
||||
+ FixedPointOperand
|
||||
|
||||
@@ -85,7 +85,7 @@ impl<C: Chain> std::fmt::Debug for Client<C> {
|
||||
impl<C: Chain> Client<C> {
|
||||
/// Returns client that is able to call RPCs on Substrate node over websocket connection.
|
||||
///
|
||||
/// This function will keep connecting to given Sustrate node until connection is established
|
||||
/// This function will keep connecting to given Substrate node until connection is established
|
||||
/// and is functional. If attempt fail, it will wait for `RECONNECT_DELAY` and retry again.
|
||||
pub async fn new(params: ConnectionParams) -> Self {
|
||||
loop {
|
||||
@@ -263,7 +263,7 @@ impl<C: Chain> Client<C> {
|
||||
|
||||
/// Get the nonce of the given Substrate account.
|
||||
///
|
||||
/// Note: It's the caller's responsibility to make sure `account` is a valid ss58 address.
|
||||
/// Note: It's the caller's responsibility to make sure `account` is a valid SS58 address.
|
||||
pub async fn next_account_index(&self, account: C::AccountId) -> Result<C::Index> {
|
||||
self.jsonrpsee_execute(move |client| async move {
|
||||
Ok(Substrate::<C>::system_account_next_index(&*client, account).await?)
|
||||
|
||||
@@ -80,7 +80,7 @@ pub fn abort_on_spec_version_change<C: ChainWithBalances>(mut env: impl Environm
|
||||
});
|
||||
}
|
||||
|
||||
/// Abort if, during a 24 hours, free balance of given account is decreased at least by given value.
|
||||
/// Abort if, during 24 hours, free balance of given account is decreased at least by given value.
|
||||
/// Other components may increase (or decrease) balance of account and it WILL affect logic of the guard.
|
||||
pub fn abort_when_account_balance_decreased<C: ChainWithBalances>(
|
||||
mut env: impl Environment<C>,
|
||||
|
||||
@@ -61,7 +61,7 @@ where
|
||||
/// All entries here (like pretty much in the entire file) must be kept in sync with Rococo
|
||||
/// `construct_runtime`, so that we maintain SCALE-compatibility.
|
||||
///
|
||||
/// See: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs
|
||||
/// See: [link](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs)
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
|
||||
pub enum Call {
|
||||
|
||||
@@ -65,7 +65,7 @@ pub struct QueuedHeaders<P: HeadersSyncPipeline> {
|
||||
/// Headers that are (we believe) currently submitted to target node by our,
|
||||
/// not-yet mined transactions.
|
||||
submitted: HeadersQueue<P>,
|
||||
/// Synced headers childrens. We need it to support case when header is synced, but some of
|
||||
/// Synced headers children. We need it to support case when header is synced, but some of
|
||||
/// its parents are incomplete.
|
||||
synced_children: SyncedChildren<P>,
|
||||
/// Pointers to all headers that we ever seen and we believe we can touch in the future.
|
||||
@@ -191,7 +191,7 @@ impl<P: HeadersSyncPipeline> QueuedHeaders<P> {
|
||||
.unwrap_or(HeaderStatus::Unknown)
|
||||
}
|
||||
|
||||
/// Get oldest header from given queue.
|
||||
/// Get the oldest header from given queue.
|
||||
pub fn header(&self, status: HeaderStatus) -> Option<&QueuedHeader<P>> {
|
||||
match status {
|
||||
HeaderStatus::Unknown | HeaderStatus::Synced => None,
|
||||
@@ -205,7 +205,7 @@ impl<P: HeadersSyncPipeline> QueuedHeaders<P> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get oldest headers from given queue until functor will return false.
|
||||
/// Get the oldest headers from given queue until functor will return false.
|
||||
pub fn headers(
|
||||
&self,
|
||||
status: HeaderStatus,
|
||||
@@ -282,7 +282,7 @@ impl<P: HeadersSyncPipeline> QueuedHeaders<P> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Receive best header from the target node.
|
||||
/// Receive the best header from the target node.
|
||||
pub fn target_best_header_response(&mut self, id: &HeaderIdOf<P>) {
|
||||
self.header_synced(id)
|
||||
}
|
||||
@@ -453,7 +453,7 @@ impl<P: HeadersSyncPipeline> QueuedHeaders<P> {
|
||||
}
|
||||
}
|
||||
|
||||
/// When incomplete headers ids are receved from target node.
|
||||
/// When incomplete headers ids are received from target node.
|
||||
pub fn incomplete_headers_response(&mut self, ids: HashSet<HeaderIdOf<P>>) {
|
||||
// all new incomplete headers are marked Synced and all their descendants
|
||||
// are moved from Ready/Submitted to Incomplete queue
|
||||
|
||||
@@ -35,7 +35,7 @@ pub struct HeadersSyncParams {
|
||||
/// Maximal total headers size in single submit request.
|
||||
pub max_headers_size_in_single_submit: usize,
|
||||
/// We only may store and accept (from Ethereum node) headers that have
|
||||
/// number >= than best_substrate_header.number - prune_depth.
|
||||
/// number >= than "best_substrate_header.number" - "prune_depth".
|
||||
pub prune_depth: u32,
|
||||
/// Target transactions mode.
|
||||
pub target_tx_mode: TargetTransactionMode,
|
||||
@@ -58,9 +58,9 @@ pub enum TargetTransactionMode {
|
||||
pub struct HeadersSync<P: HeadersSyncPipeline> {
|
||||
/// Synchronization parameters.
|
||||
params: HeadersSyncParams,
|
||||
/// Best header number known to source node.
|
||||
/// The best header number known to source node.
|
||||
source_best_number: Option<P::Number>,
|
||||
/// Best header known to target node.
|
||||
/// The best header known to target node.
|
||||
target_best_header: Option<HeaderIdOf<P>>,
|
||||
/// Headers queue.
|
||||
headers: QueuedHeaders<P>,
|
||||
@@ -85,7 +85,7 @@ impl<P: HeadersSyncPipeline> HeadersSync<P> {
|
||||
self.source_best_number
|
||||
}
|
||||
|
||||
/// Best header known to target node.
|
||||
/// The best header known to target node.
|
||||
pub fn target_best_header(&self) -> Option<HeaderIdOf<P>> {
|
||||
self.target_best_header
|
||||
}
|
||||
@@ -150,7 +150,7 @@ impl<P: HeadersSyncPipeline> HeadersSync<P> {
|
||||
Some(best_downloaded_number + One::one())
|
||||
}
|
||||
|
||||
/// Selech orphan header to downoload.
|
||||
/// Selech orphan header to download.
|
||||
pub fn select_orphan_header_to_download(&self) -> Option<&QueuedHeader<P>> {
|
||||
let orphan_header = self.headers.header(HeaderStatus::Orphan)?;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ pub trait SourceClient<P: HeadersSyncPipeline>: RelayClient {
|
||||
/// Target client trait.
|
||||
#[async_trait]
|
||||
pub trait TargetClient<P: HeadersSyncPipeline>: RelayClient {
|
||||
/// Returns ID of best header known to the target node.
|
||||
/// Returns ID of the best header known to the target node.
|
||||
async fn best_header_id(&self) -> Result<HeaderIdOf<P>, Self::Error>;
|
||||
|
||||
/// Returns true if header is known to the target node.
|
||||
|
||||
@@ -156,8 +156,8 @@ pub struct SubmittedHeaders<Id, Error> {
|
||||
/// IDs of incomplete headers. These headers were submitted (so this id is also in `submitted` vec),
|
||||
/// but all descendants are not.
|
||||
pub incomplete: Vec<Id>,
|
||||
/// IDs of ignored headers that we have decided not to submit (they're either rejected by
|
||||
/// target node immediately, or they're descendants of incomplete headers).
|
||||
/// IDs of ignored headers that we have decided not to submit (they are either rejected by
|
||||
/// target node immediately, or their descendants of incomplete headers).
|
||||
pub rejected: Vec<Id>,
|
||||
/// Fatal target node error, if it has occured during submission.
|
||||
pub fatal_error: Option<Error>,
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -27,7 +27,7 @@ pub const RECONNECT_DELAY: Duration = Duration::from_secs(10);
|
||||
/// Basic blockchain client from relay perspective.
|
||||
#[async_trait]
|
||||
pub trait Client: 'static + Clone + Send + Sync {
|
||||
/// Type of error this clients returns.
|
||||
/// Type of error these clients returns.
|
||||
type Error: 'static + Debug + MaybeConnectionError + Send + Sync;
|
||||
|
||||
/// Try to reconnect to source node.
|
||||
|
||||
Reference in New Issue
Block a user