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:
Tomasz Waszczyk
2021-08-01 20:09:40 +02:00
committed by Bastian Köcher
parent 562fac801d
commit f86d101d7c
68 changed files with 137 additions and 137 deletions
+5 -5
View File
@@ -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
+5 -5
View File
@@ -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)?;
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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>,