Fix typos (#683)
This commit is contained in:
parent
fae7835054
commit
ce215d0009
12 changed files with 17 additions and 17 deletions
|
@ -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`.
|
||||
|
|
|
@ -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<std::mutex> lock (cache_mutex);
|
||||
|
|
|
@ -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 ());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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::vote>, 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:
|
||||
|
|
|
@ -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%
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ using vectorstream = boost::iostreams::stream_buffer<boost::iostreams::back_inse
|
|||
boost::filesystem::path working_path ();
|
||||
// Get a unique path within the home directory, used for testing
|
||||
boost::filesystem::path unique_path ();
|
||||
// C++ stream are absolutely horrible so I need this helper function to do the most basic operation of creating a file if it doesn't exist or truntacing it.
|
||||
// C++ stream are absolutely horrible so I need this helper function to do the most basic operation of creating a file if it doesn't exist or truncating it.
|
||||
void open_or_create (std::fstream &, std::string const &);
|
||||
// Reads a json object from the stream and if was changed, write the object back to the stream
|
||||
template <typename T>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue