diff --git a/FindBoost.cmake b/FindBoost.cmake index e9677074..224934b5 100644 --- a/FindBoost.cmake +++ b/FindBoost.cmake @@ -925,7 +925,7 @@ function(_Boost_MISSING_DEPENDENCIES componentvar extravar) endfunction() # -# Some boost libraries may require particular set of compler features. +# Some boost libraries may require particular set of compiler features. # The very first one was `boost::fiber` introduced in Boost 1.62. # One can check required compiler features of it in # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`. diff --git a/rai/blockstore.cpp b/rai/blockstore.cpp index c62646b2..e50d1673 100644 --- a/rai/blockstore.cpp +++ b/rai/blockstore.cpp @@ -1028,7 +1028,7 @@ void rai::block_store::unchecked_put (MDB_txn * transaction_a, rai::block_hash c exists = true; } } - // Insering block if it wasn't found in database + // Inserting block if it wasn't found in database if (!exists) { std::lock_guard lock (cache_mutex); diff --git a/rai/common.cpp b/rai/common.cpp index 44369b1d..18a61b29 100644 --- a/rai/common.cpp +++ b/rai/common.cpp @@ -63,7 +63,7 @@ public: burn_account (0) { CryptoPP::AutoSeededRandomPool random_pool; - // Randomly generating these mean no two nodes will ever have the same sentinal values which protects against some insecure algorithms + // Randomly generating these mean no two nodes will ever have the same sentinel values which protects against some insecure algorithms random_pool.GenerateBlock (not_a_block.bytes.data (), not_a_block.bytes.size ()); random_pool.GenerateBlock (not_an_account.bytes.data (), not_an_account.bytes.size ()); } diff --git a/rai/core_test/ledger.cpp b/rai/core_test/ledger.cpp index 32547d56..6f9fcbca 100644 --- a/rai/core_test/ledger.cpp +++ b/rai/core_test/ledger.cpp @@ -12,7 +12,7 @@ TEST (ledger, store_error) rai::ledger ledger (store); } -// Ledger can be initialized and retuns a basic query for an empty account +// Ledger can be initialized and returns a basic query for an empty account TEST (ledger, empty) { bool init (false); diff --git a/rai/core_test/network.cpp b/rai/core_test/network.cpp index 849491c0..7737dfb2 100644 --- a/rai/core_test/network.cpp +++ b/rai/core_test/network.cpp @@ -206,7 +206,7 @@ TEST (network, send_valid_confirm_ack) ++iterations; ASSERT_LT (iterations, 200); } - // Make sure the balance has decreased after procssing the block. + // Make sure the balance has decreased after processing the block. ASSERT_EQ (50, system.nodes[1]->balance (rai::test_genesis_key.pub)); } diff --git a/rai/lib/interface.h b/rai/lib/interface.h index 283454ce..d16db966 100644 --- a/rai/lib/interface.h +++ b/rai/lib/interface.h @@ -29,7 +29,7 @@ int xrb_valid_address (const char * account); // Create a new random number in to 'destination' void xrb_generate_random (xrb_uint256 destination); -// Retrieve the detereministic private key for 'seed' at 'index' +// Retrieve the deterministic private key for 'seed' at 'index' void xrb_seed_key (const xrb_uint256 seed, int index, xrb_uint256); // Derive the public key 'pub' from 'key' void xrb_key_account (xrb_uint256 key, xrb_uint256 pub); diff --git a/rai/node/node.cpp b/rai/node/node.cpp index a1c27bd2..13fc3a8a 100644 --- a/rai/node/node.cpp +++ b/rai/node/node.cpp @@ -2736,7 +2736,7 @@ rai::uint128_t rai::election::quorum_threshold (MDB_txn * transaction_a, rai::le rai::uint128_t rai::election::minimum_threshold (MDB_txn * transaction_a, rai::ledger & ledger_a) { - // Minimum number of votes needed to change our ledger, underwhich we're probably disconnected + // Minimum number of votes needed to change our ledger, under which we're probably disconnected return ledger_a.supply (transaction_a) / 16; } @@ -2829,7 +2829,7 @@ void rai::active_transactions::announce_votes () { auto election_l (i->election); node.background ([election_l]() { election_l->broadcast_winner (); }); - if (i->announcements >= contigious_announcements - 1) + if (i->announcements >= contiguous_announcements - 1) { // These blocks have reached the confirmation interval for forks i->election->confirm_cutoff (transaction); diff --git a/rai/node/node.hpp b/rai/node/node.hpp index 125000b5..f5411f84 100644 --- a/rai/node/node.hpp +++ b/rai/node/node.hpp @@ -70,7 +70,7 @@ public: // Number of announcements in a row for this fork unsigned announcements; }; -// Core class for determining concensus +// Core class for determining consensus // Holds all active blocks i.e. recently added blocks that need confirmation class active_transactions { @@ -94,7 +94,7 @@ public: // Maximum number of conflicts to vote on per interval, lowest root hash first static unsigned constexpr announcements_per_interval = 32; // After this many successive vote announcements, block is confirmed - static unsigned constexpr contigious_announcements = 4; + static unsigned constexpr contiguous_announcements = 4; static unsigned constexpr announce_interval_ms = (rai::rai_network == rai::rai_networks::rai_test_network) ? 10 : 16000; }; class operation @@ -247,7 +247,7 @@ public: void refresh_devices (); // Refresh when the lease ends void refresh_mapping (); - // Refresh ocassionally in case router loses mapping + // Refresh occasionally in case router loses mapping void check_mapping_loop (); int check_mapping (); bool has_address (); @@ -428,7 +428,7 @@ public: rai::vote_result vote (std::shared_ptr, rai::endpoint); rai::node & node; }; -// The network is crawled for representatives by ocassionally sending a unicast confirm_req for a specific block and watching to see if it's acknowledged with a vote. +// The network is crawled for representatives by occasionally sending a unicast confirm_req for a specific block and watching to see if it's acknowledged with a vote. class rep_crawler { public: diff --git a/rai/node/testing.cpp b/rai/node/testing.cpp index 70c4be18..dceb9256 100644 --- a/rai/node/testing.cpp +++ b/rai/node/testing.cpp @@ -417,13 +417,13 @@ void rai::landing::write_store () rai::uint128_t rai::landing::distribution_amount (uint64_t interval) { - // Halfing period ~= Exponent of 2 in secounds approixmately 1 year = 2^25 = 33554432 + // Halving period ~= Exponent of 2 in seconds approximately 1 year = 2^25 = 33554432 // Interval = Exponent of 2 in seconds approximately 1 minute = 2^10 = 64 uint64_t intervals_per_period (1 << (25 - interval_exponent)); rai::uint128_t result; if (interval < intervals_per_period * 1) { - // Total supply / 2^halfing period / intervals per period + // Total supply / 2^halving period / intervals per period // 2^128 / 2^1 / (2^25 / 2^10) result = rai::uint128_t (1) << (127 - (25 - interval_exponent)); // 50% } diff --git a/rai/node/utility.hpp b/rai/node/utility.hpp index c6b55955..d5fb7c87 100644 --- a/rai/node/utility.hpp +++ b/rai/node/utility.hpp @@ -26,7 +26,7 @@ using vectorstream = boost::iostreams::stream_buffer diff --git a/rai/node/wallet.cpp b/rai/node/wallet.cpp index b128427f..e48bab37 100644 --- a/rai/node/wallet.cpp +++ b/rai/node/wallet.cpp @@ -252,7 +252,7 @@ unsigned const rai::wallet_store::version_3 (3); unsigned const rai::wallet_store::version_current (version_3); // Wallet version number rai::uint256_union const rai::wallet_store::version_special (0); -// Random number used to salt private key encription +// Random number used to salt private key encryption rai::uint256_union const rai::wallet_store::salt_special (1); // Key used to encrypt wallet keys, encrypted itself by the user password rai::uint256_union const rai::wallet_store::wallet_key_special (2); diff --git a/rai/qt/qt.cpp b/rai/qt/qt.cpp index b48c6235..c21e1cf6 100644 --- a/rai/qt/qt.cpp +++ b/rai/qt/qt.cpp @@ -1371,7 +1371,7 @@ wallet (wallet_a) auto block (this->wallet.wallet_m->change_sync (this->wallet.account, representative_l)); change_rep->setEnabled (true); show_button_success (*change_rep); - change_rep->setText ("Represenative was changed"); + change_rep->setText ("Representative was changed"); current_representative->setText (QString (representative_l.to_account_split ().c_str ())); new_representative->clear (); this->wallet.node.alarm.add (std::chrono::steady_clock::now () + std::chrono::seconds (5), [this]() {