Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #74

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/actors/bft/src/replica/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ async fn leader_prepare_reproposal_invalid_block() {
.unwrap();
}

/// Check that replica provides expecte high_vote and high_qc after finalizing a block.
/// Check that replica provides expected high_vote and high_qc after finalizing a block.
#[tokio::test]
async fn leader_commit_sanity_yield_replica_prepare() {
zksync_concurrency::testonly::abort_on_panic();
Expand Down
4 changes: 2 additions & 2 deletions node/actors/network/src/mux/reusable_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub(crate) struct StreamQueue {
}

impl StreamQueue {
/// Constructs a new StreamQueue with the specificied number of reusable streams.
/// Constructs a new StreamQueue with the specified number of reusable streams.
/// During multiplexer handshake, peers exchange information about
/// how many reusable streams they support per capability.
pub(crate) fn new(max_streams: u32) -> Arc<Self> {
Expand Down Expand Up @@ -289,7 +289,7 @@ impl ReusableStream {
read_receiver = new_read_receiver;
let (write_lock, new_write_receiver) = sync::ExclusiveLock::new(write);
write_receiver = new_write_receiver;
// Sending may fail because the requestor is not interested in the stream any more.
// Sending may fail because the requester is not interested in the stream any more.
// In this case we just close the transient stream immediately.
let _ = reservation.send(Stream {
read: ReadStream(read_lock),
Expand Down
2 changes: 1 addition & 1 deletion node/libs/concurrency/src/ctx/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::{
};
use tokio::sync::watch;

// Instant doesn't have a deterministic contructor.
// Instant doesn't have a deterministic constructor.
// However since Instant is not convertible to an unix timestamp,
// we can snapshot Instant::now() once and treat it as a constant.
// All observable effects will be then deterministic.
Expand Down
2 changes: 1 addition & 1 deletion node/libs/concurrency/src/limiter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl Limiter {
}

/// Acquires reservation for `permits` permits from the rate limiter.
/// It blocks until enought permits are available.
/// It blocks until enough permits are available.
/// It is fair in a sense that in case a later acquire() call is
/// executed, but for a smaller number of permits, it has to wait
/// until the previous call (for a larger number of permits) completes.
Expand Down
2 changes: 1 addition & 1 deletion node/libs/concurrency/src/limiter/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn immediate_permit_consumption() {
}

#[tokio::test]
async fn inifinite_refresh_rate() {
async fn infinite_refresh_rate() {
testonly::abort_on_panic();
let clock = &ctx::ManualClock::new();
let ctx = &ctx::test_root(clock);
Expand Down
4 changes: 2 additions & 2 deletions node/libs/concurrency/src/scope/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//! Task can be either async or blocking:
//! * Async tasks are Futures executed via `Task::run`. They MUSN'T call blocking operations,
//! because they are executed on a shared thread pool.
//! * Blocking tasks are `FnOnce()` functions/closures exeucted via `Task::run_blocking`. Blocking
//! * Blocking tasks are `FnOnce()` functions/closures executed via `Task::run_blocking`. Blocking
//! task MUST be executed on a dedicated thread rather than a shared thread pool.
//! * All functions which perform blocking calls should be documented as blocking.
//! If a function has multiple versions and the async version is called `<f>`, then the sync
Expand Down Expand Up @@ -117,7 +117,7 @@ impl<E: 'static + Send> Task<E> {
}

/// Runs an sync blocking task in the scope. MUST be executed on a dedicated thread.
/// See `Task::run` for behavior. See module docs for desciption of blocking tasks.
/// See `Task::run` for behavior. See module docs for description of blocking tasks.
pub(super) fn run_blocking<T>(self, f: impl FnOnce() -> Result<T, E>) -> Result<T, Terminated> {
let panic_reporter = PanicReporter::new(self);
let res = f();
Expand Down
2 changes: 1 addition & 1 deletion node/libs/protobuf/src/proto_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ pub(super) fn read_fields(
}

/// Converts an encoded protobuf message to its canonical form, given the descriptor of the message
/// type. Retuns an error if:
/// type. Returns an error if:
/// * an unknown field is detected
/// * the message type doesn't support canonical encoding (implicit presence, map fields)
pub fn canonical_raw(
Expand Down
2 changes: 1 addition & 1 deletion node/libs/roles/src/proto/validator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ message NetAddress {
// Currently the IP of the validator is static, but this scheme might also
// be used to provide dynamic IP support (if validator discovers that its
// own IP has changed - by pinging a trusted STUN server for example - it can
// broadcast a new discovery message), or (mutli)proxy support (a validator
// broadcast a new discovery message), or (multi)proxy support (a validator
// may maintain a dynamic set of trusted proxy servers which forward traffic
// to it - this way validator wouldn't have to have a public IP at all).
optional uint64 version = 2; // required
Expand Down
Loading