Skip to content

Commit 4d9b425

Browse files
rex4539Dimitris Apostolou
authored and
Dimitris Apostolou
committed
Fix typos
1 parent 00d1680 commit 4d9b425

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+55
-55
lines changed

src/core_write.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,6 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
209209
entry.pushKV("blockhash", hashBlock.GetHex());
210210

211211
if (include_hex) {
212-
entry.pushKV("hex", EncodeHexTx(tx, serialize_flags)); // the hex-encoded transaction. used the name "hex" to be consistent with the verbose output of "getrawtransaction".
212+
entry.pushKV("hex", EncodeHexTx(tx, serialize_flags)); // The hex-encoded transaction. Used the name "hex" to be consistent with the verbose output of "getrawtransaction".
213213
}
214214
}

src/cuckoocache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class cache
224224
*
225225
* Instead we treat the 32-bit random number as a Q32 fixed-point number in the range
226226
* [0,1) and simply multiply it by the size. Then we just shift the result down by
227-
* 32-bits to get our bucket number. The results has non-uniformity the same as a
227+
* 32-bits to get our bucket number. The result has non-uniformity the same as a
228228
* mod, but it is much faster to compute. More about this technique can be found at
229229
* http://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/
230230
*

src/net.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ void CConnman::ThreadOpenAddedConnections()
19541954
for (const AddedNodeInfo& info : vInfo) {
19551955
if (!info.fConnected) {
19561956
if (!grant.TryAcquire()) {
1957-
// If we've used up our semaphore and need a new one, lets not wait here since while we are waiting
1957+
// If we've used up our semaphore and need a new one, let's not wait here since while we are waiting
19581958
// the addednodeinfo state might change.
19591959
break;
19601960
}

src/net_processing.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ bool MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const CBlockIndex*
339339
CNodeState *state = State(nodeid);
340340
assert(state != nullptr);
341341

342-
// Short-circuit most stuff in case its from the same node
342+
// Short-circuit most stuff in case it is from the same node
343343
std::map<uint256, std::pair<NodeId, std::list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
344344
if (itInFlight != mapBlocksInFlight.end() && itInFlight->second.first == nodeid) {
345345
if (pit) {
@@ -518,7 +518,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<con
518518
}
519519

520520
// Iterate over those blocks in vToFetch (in forward direction), adding the ones that
521-
// are not yet downloaded and not in flight to vBlocks. In the mean time, update
521+
// are not yet downloaded and not in flight to vBlocks. In the meantime, update
522522
// pindexLastCommonBlock as long as all ancestors are already downloaded, or if it's
523523
// already part of our chain (and therefore don't need it even if pruned).
524524
for (const CBlockIndex* pindex : vToFetch) {

src/qt/coincontroldialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void CoinControlDialog::showMenu(const QPoint &point)
206206
contextMenuItem = item;
207207

208208
// disable some items (like Copy Transaction ID, lock, unlock) for tree roots in context menu
209-
if (item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)
209+
if (item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means it is a child node, so it is not a parent node in tree mode)
210210
{
211211
copyTransactionHashAction->setEnabled(true);
212212
if (model->isLockedCoin(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt()))
@@ -374,7 +374,7 @@ void CoinControlDialog::radioListMode(bool checked)
374374
// checkbox clicked by user
375375
void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
376376
{
377-
if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)
377+
if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means it is a child node, so it is not a parent node in tree mode)
378378
{
379379
COutPoint outpt(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());
380380

src/qt/guiutil.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace GUIUtil
141141
* Makes a QTableView last column feel as if it was being resized from its left border.
142142
* Also makes sure the column widths are never larger than the table's viewport.
143143
* In Qt, all columns are resizable from the right, but it's not intuitive resizing the last column from the right.
144-
* Usually our second to last columns behave as if stretched, and when on strech mode, columns aren't resizable
144+
* Usually our second to last columns behave as if stretched, and when on stretch mode, columns aren't resizable
145145
* interactively or programmatically.
146146
*
147147
* This helper object takes care of this issue.

src/qt/modaloverlay.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
8181
// keep a vector of samples of verification progress at height
8282
blockProcessTime.push_front(qMakePair(currentDate.toMSecsSinceEpoch(), nVerificationProgress));
8383

84-
// show progress speed if we have more then one sample
84+
// show progress speed if we have more than one sample
8585
if (blockProcessTime.size() >= 2) {
8686
double progressDelta = 0;
8787
double progressPerHour = 0;

src/qt/splashscreen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
9191

9292
pixPaint.setFont(QFont(font, 15*fontFactor));
9393

94-
// if the version string is to long, reduce size
94+
// if the version string is too long, reduce size
9595
fm = pixPaint.fontMetrics();
9696
int versionTextWidth = fm.width(versionText);
9797
if(versionTextWidth > titleTextWidth+paddingRight-10) {

src/qt/walletmodel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ bool WalletModel::bumpFee(uint256 hash)
698698
confirmationDialog.exec();
699699
QMessageBox::StandardButton retval = static_cast<QMessageBox::StandardButton>(confirmationDialog.result());
700700

701-
// cancel sign&broadcast if users doesn't want to bump the fee
701+
// cancel sign&broadcast if user doesn't want to bump the fee
702702
if (retval != QMessageBox::Yes) {
703703
return false;
704704
}

src/random.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void RandAddSeedSleep();
3232

3333
/**
3434
* Function to gather random data from multiple sources, failing whenever any
35-
* of those source fail to provide a result.
35+
* of those sources fail to provide a result.
3636
*/
3737
void GetStrongRandBytes(unsigned char* buf, int num);
3838

src/script/interpreter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
110110
// excluding the sighash byte.
111111
// * R-length: 1-byte length descriptor of the R value that follows.
112112
// * R: arbitrary-length big-endian encoded R value. It must use the shortest
113-
// possible encoding for a positive integers (which means no null bytes at
113+
// possible encoding for a positive integer (which means no null bytes at
114114
// the start, except a single one when the next byte has its highest bit set).
115115
// * S-length: 1-byte length descriptor of the S value that follows.
116116
// * S: arbitrary-length big-endian encoded S value. The same rules apply.

src/support/lockedpool.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void Win32LockedPageAllocator::FreeLocked(void* addr, size_t len)
184184

185185
size_t Win32LockedPageAllocator::GetLimit()
186186
{
187-
// TODO is there a limit on windows, how to get it?
187+
// TODO is there a limit on Windows, how to get it?
188188
return std::numeric_limits<size_t>::max();
189189
}
190190
#endif

src/test/addrman_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)
491491
// this test could be a security issue.
492492
BOOST_CHECK(info1.GetNewBucket(nKey1) != info1.GetNewBucket(nKey2));
493493

494-
// Test: Ports should not effect bucket placement in the addr
494+
// Test: Ports should not affect bucket placement in the addr
495495
CAddrInfo info2 = CAddrInfo(addr2, source1);
496496
BOOST_CHECK(info1.GetKey() != info2.GetKey());
497497
BOOST_CHECK_EQUAL(info1.GetNewBucket(nKey1), info2.GetNewBucket(nKey1));

src/test/coins_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
313313
auto utxod = FindRandomFrom(coinbase_coins);
314314
// Reuse the exact same coinbase
315315
tx = std::get<0>(utxod->second);
316-
// shouldn't be available for reconnection if its been duplicated
316+
// shouldn't be available for reconnection if it's been duplicated
317317
disconnected_coins.erase(utxod->first);
318318

319319
duplicate_coins.insert(utxod->first);

src/test/cuckoocache_tests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void test_cache_erase(size_t megabytes)
163163
for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
164164
set.insert(hashes_insert_copy[i]);
165165

166-
/** elements that we marked erased but that are still there */
166+
/** elements that we marked as erased but are still there */
167167
size_t count_erased_but_contained = 0;
168168
/** elements that we did not erase but are older */
169169
size_t count_stale = 0;
@@ -303,7 +303,7 @@ void test_cache_generations()
303303
local_rand_ctx = FastRandomContext(true);
304304

305305
// block_activity models a chunk of network activity. n_insert elements are
306-
// adde to the cache. The first and last n/4 are stored for removal later
306+
// added to the cache. The first and last n/4 are stored for removal later
307307
// and the middle n/2 are not stored. This models a network which uses half
308308
// the signatures of recently (since the last block) added transactions
309309
// immediately and never uses the other half.

src/test/dbwrapper_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
237237
}
238238

239239
struct StringContentsSerializer {
240-
// Used to make two serialized objects the same while letting them have a different lengths
240+
// Used to make two serialized objects the same while letting them have different lengths
241241
// This is a terrible idea
242242
std::string str;
243243
StringContentsSerializer() {}

src/test/mempool_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
523523
pool.addUnchecked(tx6.GetHash(), entry.Fee(1100LL).FromTx(tx6));
524524
pool.addUnchecked(tx7.GetHash(), entry.Fee(9000LL).FromTx(tx7));
525525

526-
// we only require this remove, at max, 2 txn, because its not clear what we're really optimizing for aside from that
526+
// we only require this to remove, at max, 2 txn, because it's not clear what we're really optimizing for aside from that
527527
pool.TrimToSize(pool.DynamicMemoryUsage() - 1);
528528
BOOST_CHECK(pool.exists(tx4.GetHash()));
529529
BOOST_CHECK(pool.exists(tx6.GetHash()));

src/test/txvalidationcache_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ToMemPool(CMutableTransaction& tx)
3535

3636
BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
3737
{
38-
// Make sure skipping validation of transctions that were
38+
// Make sure skipping validation of transactions that were
3939
// validated going into the memory pool does not allow
4040
// double-spends in blocks to pass validation when they should not.
4141

src/tinyformat.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace tfm = tinyformat;
155155
#endif
156156

157157
#ifdef __APPLE__
158-
// Workaround OSX linker warning: xcode uses different default symbol
158+
// Workaround OSX linker warning: Xcode uses different default symbol
159159
// visibilities for static libs vs executables (see issue #25)
160160
# define TINYFORMAT_HIDDEN __attribute__((visibility("hidden")))
161161
#else
@@ -592,7 +592,7 @@ inline const char* printFormatStringLiteral(std::ostream& out, const char* fmt)
592592
// Formatting options which can't be natively represented using the ostream
593593
// state are returned in spacePadPositive (for space padded positive numbers)
594594
// and ntrunc (for truncating conversions). argIndex is incremented if
595-
// necessary to pull out variable width and precision . The function returns a
595+
// necessary to pull out variable width and precision. The function returns a
596596
// pointer to the character after the end of the current format spec.
597597
inline const char* streamStateFromFormat(std::ostream& out, bool& spacePadPositive,
598598
int& ntrunc, const char* fmtStart,

src/txmempool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class CTxMemPool
689689
};
690690

691691
/**
692-
* CCoinsView that brings transactions from a memorypool into view.
692+
* CCoinsView that brings transactions from a mempool into view.
693693
* It does not check for spendings by memory pool transactions.
694694
* Instead, it provides access to all Coins which are either unspent in the
695695
* base CCoinsView, or are outputs from any mempool transaction!

src/undo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Contains the prevout's CTxOut being spent, and its metadata as well
1717
* (coinbase or not, height). The serialization contains a dummy value of
18-
* zero. This is be compatible with older versions which expect to see
18+
* zero. This is compatible with older versions which expect to see
1919
* the transaction version there.
2020
*/
2121
class TxInUndoSerializer

src/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ template<typename T, typename... Args> static inline void MarkUsed(const T& t, c
136136

137137
// Be conservative when using LogPrintf/error or other things which
138138
// unconditionally log to debug.log! It should not be the case that an inbound
139-
// peer can fill up a users disk with debug.log entries.
139+
// peer can fill up a user's disk with debug.log entries.
140140

141141
#ifdef USE_COVERAGE
142142
#define LogPrintf(...) do { MarkUsed(__VA_ARGS__); } while(0)

src/validation.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
949949

950950
// This transaction should only count for fee estimation if:
951951
// - it isn't a BIP 125 replacement transaction (may not be widely supported)
952-
// - it's not being readded during a reorg which bypasses typical mempool fee limits
952+
// - it's not being re-added during a reorg which bypasses typical mempool fee limits
953953
// - the node is not behind
954954
// - the transaction is not dependent on any other transactions in the mempool
955955
bool validForFeeEstimation = !fReplacementTransaction && !bypass_limits && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx);
@@ -1852,7 +1852,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
18521852
// Once BIP34 activated it was not possible to create new duplicate coinbases and thus other than starting
18531853
// with the 2 existing duplicate coinbase pairs, not possible to create overwriting txs. But by the
18541854
// time BIP34 activated, in each of the existing pairs the duplicate coinbase had overwritten the first
1855-
// before the first had been spent. Since those coinbases are sufficiently buried its no longer possible to create further
1855+
// before the first had been spent. Since those coinbases are sufficiently buried it's no longer possible to create further
18561856
// duplicate transactions descending from the known pairs either.
18571857
// If we're on the known chain at height greater than where BIP34 activated, we can save the db accesses needed for the BIP30 check.
18581858

src/wallet/rpcwallet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ UniValue listsinceblock(const JSONRPCRequest& request)
20152015
" ],\n"
20162016
" \"removed\": [\n"
20172017
" <structure is the same as \"transactions\" above, only present if include_removed=true>\n"
2018-
" Note: transactions that were readded in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n"
2018+
" Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n"
20192019
" ],\n"
20202020
" \"lastblock\": \"lastblockhash\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
20212021
"}\n"
@@ -3578,7 +3578,7 @@ UniValue rescanblockchain(const JSONRPCRequest& request)
35783578
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid stop_height");
35793579
}
35803580
else if (pindexStop->nHeight < pindexStart->nHeight) {
3581-
throw JSONRPCError(RPC_INVALID_PARAMETER, "stop_height must be greater then start_height");
3581+
throw JSONRPCError(RPC_INVALID_PARAMETER, "stop_height must be greater than start_height");
35823582
}
35833583
}
35843584
}

src/wallet/wallet.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ void CWallet::BlockUntilSyncedToCurrentChain() {
12691269
// chainActive.Tip()...
12701270
// We could also take cs_wallet here, and call m_last_block_processed
12711271
// protected by cs_wallet instead of cs_main, but as long as we need
1272-
// cs_main here anyway, its easier to just call it cs_main-protected.
1272+
// cs_main here anyway, it's easier to just call it cs_main-protected.
12731273
LOCK(cs_main);
12741274
const CBlockIndex* initialChainTip = chainActive.Tip();
12751275

@@ -4186,8 +4186,8 @@ bool CWalletTx::AcceptToMemoryPool(const CAmount& nAbsurdFee, CValidationState&
41864186
// We must set fInMempool here - while it will be re-set to true by the
41874187
// entered-mempool callback, if we did not there would be a race where a
41884188
// user could call sendmoney in a loop and hit spurious out of funds errors
4189-
// because we think that the transaction they just generated's change is
4190-
// unavailable as we're not yet aware its in mempool.
4189+
// because we think that this newly generated transaction's change is
4190+
// unavailable as we're not yet aware that it is in the mempool.
41914191
bool ret = ::AcceptToMemoryPool(mempool, state, tx, nullptr /* pfMissingInputs */,
41924192
nullptr /* plTxnReplaced */, false /* bypass_limits */, nAbsurdFee);
41934193
fInMempool |= ret;

test/functional/example_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BaseNode(P2PInterface):
3838
def __init__(self):
3939
"""Initialize the P2PInterface
4040

41-
Used to inialize custom properties for the Node that aren't
41+
Used to initialize custom properties for the Node that aren't
4242
included by default in the base class. Be aware that the P2PInterface
4343
base class already stores a counter for each P2P message type and the
4444
last received message of each type, which should be sufficient for the

test/functional/feature_maxuploadtarget.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
* Verify that getdata requests for old blocks (>1week) are dropped
88
if uploadtarget has been reached.
9-
* Verify that getdata requests for recent blocks are respecteved even
9+
* Verify that getdata requests for recent blocks are respected even
1010
if uploadtarget has been reached.
1111
* Verify that the upload counters are reset after 24 hours.
1212
"""

test/functional/feature_pruning.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def reorg_back(self):
190190

191191
# Verify that we have enough history to reorg back to the fork point
192192
# Although this is more than 288 blocks, because this chain was written more recently
193-
# and only its other 299 small and 220 large block are in the block files after it,
194-
# its expected to still be retained
193+
# and only its other 299 small and 220 large blocks are in the block files after it,
194+
# it is expected to still be retained
195195
self.nodes[2].getblock(self.nodes[2].getblockhash(self.forkheight))
196196

197197
first_reorg_height = self.nodes[2].getblockcount()

test/functional/interface_rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def run_test(self):
107107
#check chainTip response
108108
assert_equal(json_obj['chaintipHash'], bb_hash)
109109

110-
#make sure there is no utox in the response because this oupoint has been spent
110+
#make sure there is no utxo in the response because this oupoint has been spent
111111
assert_equal(len(json_obj['utxos']), 0)
112112

113113
#check bitmap

test/functional/mempool_persist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
transactions in its mempool. This tests that -persistmempool=0
3030
does not overwrite a previously valid mempool stored on disk.
3131
- Remove node0 mempool.dat and verify savemempool RPC recreates it
32-
and verify that node1 can load it and has 5 transaction in its
32+
and verify that node1 can load it and has 5 transactions in its
3333
mempool.
3434
- Verify that savemempool throws when the RPC is called if
3535
node1 can't write to disk.

0 commit comments

Comments
 (0)