diff --git a/nano/lib/utility.cpp b/nano/lib/utility.cpp index 64d51efaca..c6fa37a355 100644 --- a/nano/lib/utility.cpp +++ b/nano/lib/utility.cpp @@ -149,7 +149,7 @@ void assert_internal (char const * check_expr, char const * func, char const * f // As there is no async-signal-safe way to generate stacktraces on Windows it must be done before aborting #ifdef _WIN32 { - // Try construct the stacktrace dump in the same folder as the the running executable, otherwise use the current directory. + // Try construct the stacktrace dump in the same folder as the running executable, otherwise use the current directory. boost::system::error_code err; auto running_executable_filepath = boost::dll::program_location (err); std::string filename = is_release_assert ? "nano_node_backtrace_release_assert.txt" : "nano_node_backtrace_assert.txt"; diff --git a/nano/nano_node/entry.cpp b/nano/nano_node/entry.cpp index 0fc201d6e3..328ff900cc 100644 --- a/nano/nano_node/entry.cpp +++ b/nano/nano_node/entry.cpp @@ -218,7 +218,7 @@ int main (int argc, char * const * argv) return std::accumulate (reps.begin (), reps.end (), nano::uint128_t{ 0 }, [] (auto sum, auto const & rep) { return sum + rep.second; }); }; - // Hardcoded weights are filtered to a cummulative weight of 99%, need to do the same for ledger weights + // Hardcoded weights are filtered to a cumulative weight of 99%, need to do the same for ledger weights std::remove_const_t ledger; { std::vector> sorted; @@ -1721,7 +1721,7 @@ int main (int argc, char * const * argv) { std::cout << boost::str (boost::format ("%1% pending blocks validated\n") % count); } - // Check block existance + // Check block existence auto block = node->ledger.any.block_get (transaction, key.hash); bool pruned (false); if (block == nullptr) diff --git a/nano/node/bootstrap/block_deserializer.hpp b/nano/node/bootstrap/block_deserializer.hpp index 55b484ea3c..dce67edf92 100644 --- a/nano/node/bootstrap/block_deserializer.hpp +++ b/nano/node/bootstrap/block_deserializer.hpp @@ -16,7 +16,7 @@ namespace bootstrap { /** * Class to read a block-type byte followed by a serialised block from a stream. - * It is typically used to used to read a series of block-types and blocks terminated by a not-a-block type. + * It is typically used to read a series of block-types and blocks terminated by a not-a-block type. */ class block_deserializer : public std::enable_shared_from_this { diff --git a/nano/node/bootstrap/bootstrap_bulk_pull.cpp b/nano/node/bootstrap/bootstrap_bulk_pull.cpp index 50b43469a0..a4967bf35c 100644 --- a/nano/node/bootstrap/bootstrap_bulk_pull.cpp +++ b/nano/node/bootstrap/bootstrap_bulk_pull.cpp @@ -345,9 +345,9 @@ void nano::bulk_pull_account_client::receive_pending () * The account is supplied as the "start" member, and the final block to * send is the "end" member. The "start" member may also be a block * hash, in which case the that hash is used as the start of a chain - * to send. To determine if "start" is interpretted as an account or + * to send. To determine if "start" is interpreted as an account or * hash, the ledger is checked to see if the block specified exists, - * if not then it is interpretted as an account. + * if not then it is interpreted as an account. * * Additionally, if "start" is specified as a block hash the range * is inclusive of that block hash, that is the range will be: @@ -776,7 +776,7 @@ std::pair, std::unique_ptr lock{ mutex }; start_account = start_account_a; } diff --git a/nano/node/bootstrap_ascending/service.cpp b/nano/node/bootstrap_ascending/service.cpp index fce8efe52f..c82e91c51e 100644 --- a/nano/node/bootstrap_ascending/service.cpp +++ b/nano/node/bootstrap_ascending/service.cpp @@ -680,7 +680,7 @@ void nano::bootstrap_ascending::service::process (const nano::asc_pull_ack::bloc { if (block == blocks.back ()) { - // It's the last block submitted for this account chanin, reset timestamp to allow more requests + // It's the last block submitted for this account chain, reset timestamp to allow more requests block_processor.add (block, nano::block_source::bootstrap, nullptr, [this, account = tag.account] (auto result) { stats.inc (nano::stat::type::bootstrap_ascending, nano::stat::detail::timestamp_reset); { diff --git a/nano/node/cli.cpp b/nano/node/cli.cpp index 7b9dbf6bc3..75ec166243 100644 --- a/nano/node/cli.cpp +++ b/nano/node/cli.cpp @@ -23,7 +23,7 @@ std::string nano::error_cli_messages::message (int ev) const case nano::error_cli::generic: return "Unknown error"; case nano::error_cli::parse_error: - return "Coud not parse command line"; + return "Could not parse command line"; case nano::error_cli::invalid_arguments: return "Invalid arguments"; case nano::error_cli::unknown_command: @@ -342,7 +342,7 @@ std::error_code nano::handle_node_options (boost::program_options::variables_map } else { - std::cerr << "account comand requires one option\n"; + std::cerr << "account command requires one option\n"; ec = nano::error_cli::invalid_arguments; } } diff --git a/nano/node/distributed_work.cpp b/nano/node/distributed_work.cpp index c963048baa..56312d7cc7 100644 --- a/nano/node/distributed_work.cpp +++ b/nano/node/distributed_work.cpp @@ -263,7 +263,7 @@ void nano::distributed_work::success (std::string const & body_a, nano::tcp_endp } else { - node.logger.error (nano::log::type::distributed_work, "Incorrect work response from {}:{} for root {} with diffuculty {}: {}", + node.logger.error (nano::log::type::distributed_work, "Incorrect work response from {}:{} for root {} with difficulty {}: {}", nano::util::to_str (endpoint_a.address ()), endpoint_a.port (), request.root.to_string (), diff --git a/nano/node/ipc/ipc_server.cpp b/nano/node/ipc/ipc_server.cpp index d642ad8db7..bdd1eac708 100644 --- a/nano/node/ipc/ipc_server.cpp +++ b/nano/node/ipc/ipc_server.cpp @@ -156,7 +156,7 @@ class session final : public nano::ipc::socket_base, public std::enable_shared_f /** * Write to underlying socket. Writes goes through a queue protected by the strand. Thus, this function * can be called concurrently with other writes. - * @note This function explicitely doesn't use nano::shared_const_buffer, as buffers usually originate from Flatbuffers + * @note This function explicitly doesn't use nano::shared_const_buffer, as buffers usually originate from Flatbuffers * and copying into the shared_const_buffer vector would impose a significant overhead for large requests and responses. */ void queued_write (boost::asio::const_buffer const & buffer_a, std::function callback_a) diff --git a/nano/node/message_processor.cpp b/nano/node/message_processor.cpp index 4e82a23ee2..89aeb1f8b9 100644 --- a/nano/node/message_processor.cpp +++ b/nano/node/message_processor.cpp @@ -184,7 +184,7 @@ class process_visitor : public nano::message_visitor void publish (nano::publish const & message) override { - // Put blocks that are being initally broadcasted in a separate queue, so that they won't have to compete with rebroadcasted blocks + // Put blocks that are being initially broadcasted in a separate queue, so that they won't have to compete with rebroadcasted blocks // Both queues have the same priority and size, so the potential for exploiting this is limited bool added = node.block_processor.add (message.block, message.is_originator () ? nano::block_source::live_originator : nano::block_source::live, channel); if (!added) diff --git a/nano/node/scheduler/manual.hpp b/nano/node/scheduler/manual.hpp index 648a7e934c..3e059b3447 100644 --- a/nano/node/scheduler/manual.hpp +++ b/nano/node/scheduler/manual.hpp @@ -37,7 +37,7 @@ class manual final void start (); void stop (); - // Manualy start an election for a block + // Manually start an election for a block // Call action with confirmed block, may be different than what we started with void push (std::shared_ptr const &, boost::optional const & = boost::none); diff --git a/nano/node/transport/tcp_listener.cpp b/nano/node/transport/tcp_listener.cpp index 06c49332ad..4b29dfb523 100644 --- a/nano/node/transport/tcp_listener.cpp +++ b/nano/node/transport/tcp_listener.cpp @@ -389,7 +389,7 @@ auto nano::transport::tcp_listener::accept_one (asio::ip::tcp::socket raw_socket try { - // Best effor attempt to gracefully close the socket, shutdown before closing to avoid zombie sockets + // Best effort attempt to gracefully close the socket, shutdown before closing to avoid zombie sockets raw_socket.shutdown (asio::ip::tcp::socket::shutdown_both); raw_socket.close (); } diff --git a/nano/node/transport/tcp_server.hpp b/nano/node/transport/tcp_server.hpp index f0e93924ee..96085ae8b1 100644 --- a/nano/node/transport/tcp_server.hpp +++ b/nano/node/transport/tcp_server.hpp @@ -36,7 +36,7 @@ class tcp_server final : public std::enable_shared_from_this nano::mutex mutex; std::atomic stopped{ false }; std::atomic handshake_received{ false }; - // Remote enpoint used to remove response channel even after socket closing + // Remote endpoint used to remove response channel even after socket closing nano::tcp_endpoint remote_endpoint{ boost::asio::ip::address_v6::any (), 0 }; std::chrono::steady_clock::time_point last_telemetry_req{}; diff --git a/nano/node/vote_router.hpp b/nano/node/vote_router.hpp index 71bb42ed52..0468bf3d3c 100644 --- a/nano/node/vote_router.hpp +++ b/nano/node/vote_router.hpp @@ -40,7 +40,7 @@ nano::stat::detail to_stat_detail (vote_source); // This class routes votes to their associated election // This class holds a weak_ptr as this container does not own the elections -// Routing entries are removed perodically if the weak_ptr has expired +// Routing entries are removed periodically if the weak_ptr has expired class vote_router final { public: diff --git a/nano/node/websocket.hpp b/nano/node/websocket.hpp index 19e1645970..2a38956060 100644 --- a/nano/node/websocket.hpp +++ b/nano/node/websocket.hpp @@ -255,7 +255,7 @@ namespace websocket /** Close the websocket and end the session */ void close (); - /** Read the next message. This implicitely handles incoming websocket pings. */ + /** Read the next message. This implicitly handles incoming websocket pings. */ void read (); /** Enqueue \p message_a for writing to the websockets */