aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base58.cpp2
-rw-r--r--src/bench/bench.h2
-rw-r--r--src/blockencodings.cpp2
-rw-r--r--src/core_write.cpp4
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/rpcconsole.cpp3
-rw-r--r--src/qt/test/paymentservertests.cpp2
-rw-r--r--src/rpc/server.h2
-rw-r--r--src/test/addrman_tests.cpp2
-rw-r--r--src/test/checkqueue_tests.cpp2
-rw-r--r--src/test/cuckoocache_tests.cpp2
-rw-r--r--src/test/merkle_tests.cpp2
-rw-r--r--src/test/rpc_tests.cpp2
-rw-r--r--src/test/util_tests.cpp2
-rw-r--r--src/txmempool.cpp2
-rw-r--r--src/txmempool.h8
-rw-r--r--src/validation.cpp2
-rw-r--r--src/validation.h2
-rw-r--r--src/validationinterface.h7
19 files changed, 30 insertions, 22 deletions
diff --git a/src/base58.cpp b/src/base58.cpp
index e2f475bb7f..36b3523692 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -134,7 +134,7 @@ bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
vchRet.clear();
return false;
}
- // re-calculate the checksum, insure it matches the included 4-byte checksum
+ // re-calculate the checksum, ensure it matches the included 4-byte checksum
uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4);
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0) {
vchRet.clear();
diff --git a/src/bench/bench.h b/src/bench/bench.h
index 0e7605c726..f12a41126c 100644
--- a/src/bench/bench.h
+++ b/src/bench/bench.h
@@ -14,7 +14,7 @@
// Simple micro-benchmarking framework; API mostly matches a subset of the Google Benchmark
// framework (see https://github.com/google/benchmark)
-// Wny not use the Google Benchmark framework? Because adding Yet Another Dependency
+// Why not use the Google Benchmark framework? Because adding Yet Another Dependency
// (that uses cmake as its build system and has lots of features we don't need) isn't
// worth it.
diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp
index 4a311cbba2..90120b82eb 100644
--- a/src/blockencodings.cpp
+++ b/src/blockencodings.cpp
@@ -147,7 +147,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
// request it.
// This should be rare enough that the extra bandwidth doesn't matter,
// but eating a round-trip due to FillBlock failure would be annoying
- // Note that we dont want duplication between extra_txn and mempool to
+ // Note that we don't want duplication between extra_txn and mempool to
// trigger this case, so we compare witness hashes first
if (txn_available[idit->second] &&
txn_available[idit->second]->GetWitnessHash() != extra_txn[i].second->GetWitnessHash()) {
diff --git a/src/core_write.cpp b/src/core_write.cpp
index b0993a131f..a3ca87c8b5 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -114,9 +114,9 @@ std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDeco
return str;
}
-std::string EncodeHexTx(const CTransaction& tx, const int serialFlags)
+std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags)
{
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | serialFlags);
+ CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | serializeFlags);
ssTx << tx;
return HexStr(ssTx.begin(), ssTx.end());
}
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index fd3dcac424..bb5b2d4347 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -443,7 +443,7 @@ void SubstituteFonts(const QString& language)
/* 10.10 or later system */
if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC");
- else if (language == "ja") // Japanesee
+ else if (language == "ja") // Japanese
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC");
else
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande");
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 60406c2059..7a0d0b3e0a 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -626,9 +626,12 @@ void RPCConsole::setClientModel(ClientModel *model)
for (size_t i = 0; i < commandList.size(); ++i)
{
wordList << commandList[i].c_str();
+ wordList << ("help " + commandList[i]).c_str();
}
+ wordList.sort();
autoCompleter = new QCompleter(wordList, this);
+ autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
ui->lineEdit->setCompleter(autoCompleter);
autoCompleter->popup()->installEventFilter(this);
// Start thread to execute RPC commands.
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index 84ccfea730..08a76c7d49 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -142,7 +142,7 @@ void PaymentServerTests::paymentServerTests()
byteArray = QByteArray((const char*)&data[0], data.size());
r.paymentRequest.parse(byteArray);
// Ensure the request is initialized, because network "main" is default, even for
- // uninizialized payment requests and that will fail our test here.
+ // uninitialized payment requests and that will fail our test here.
QVERIFY(r.paymentRequest.IsInitialized());
QCOMPARE(PaymentServer::verifyNetwork(r.paymentRequest.getDetails()), false);
diff --git a/src/rpc/server.h b/src/rpc/server.h
index ad064e5690..de14c7ed3e 100644
--- a/src/rpc/server.h
+++ b/src/rpc/server.h
@@ -68,7 +68,7 @@ void SetRPCWarmupStatus(const std::string& newStatus);
void SetRPCWarmupFinished();
/* returns the current warmup state. */
-bool RPCIsInWarmup(std::string *statusOut);
+bool RPCIsInWarmup(std::string *outStatus);
/**
* Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp
index 322addc9f6..5d1c5b78d1 100644
--- a/src/test/addrman_tests.cpp
+++ b/src/test/addrman_tests.cpp
@@ -413,7 +413,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
size_t percent23 = (addrman.size() * 23) / 100;
BOOST_CHECK(vAddr.size() == percent23);
BOOST_CHECK(vAddr.size() == 461);
- // (Addrman.size() < number of addresses added) due to address collisons.
+ // (Addrman.size() < number of addresses added) due to address collisions.
BOOST_CHECK(addrman.size() == 2007);
}
diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp
index 2f958c885c..287395c6c6 100644
--- a/src/test/checkqueue_tests.cpp
+++ b/src/test/checkqueue_tests.cpp
@@ -303,7 +303,7 @@ BOOST_AUTO_TEST_CASE(test_CheckQueue_UniqueCheck)
}
-// Test that blocks which might allocate lots of memory free their memory agressively.
+// Test that blocks which might allocate lots of memory free their memory aggressively.
//
// This test attempts to catch a pathological case where by lazily freeing
// checks might mean leaving a check un-swapped out, and decreasing by 1 each
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp
index 00446aa11e..4d6d6d6210 100644
--- a/src/test/cuckoocache_tests.cpp
+++ b/src/test/cuckoocache_tests.cpp
@@ -379,7 +379,7 @@ void test_cache_generations()
// Loose Check that hit rate is above min_hit_rate
BOOST_CHECK(hit > min_hit_rate);
// Tighter check, count number of times we are less than tight_hit_rate
- // (and implicityly, greater than min_hit_rate)
+ // (and implicitly, greater than min_hit_rate)
out_of_tight_tolerance += hit < tight_hit_rate;
}
// Check that being out of tolerance happens less than
diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp
index af02d67f74..f2f06fa8e2 100644
--- a/src/test/merkle_tests.cpp
+++ b/src/test/merkle_tests.cpp
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
// If no mutation was done (once for every ntx value), try up to 16 branches.
if (mutate == 0) {
for (int loop = 0; loop < std::min(ntx, 16); loop++) {
- // If ntx <= 16, try all branches. Otherise, try 16 random ones.
+ // If ntx <= 16, try all branches. Otherwise, try 16 random ones.
int mtx = loop;
if (ntx > 16) {
mtx = insecure_rand() % ntx;
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 399bdbc811..7cf2a744ea 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -276,7 +276,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
BOOST_CHECK(banned_until.get_int64() > now);
BOOST_CHECK(banned_until.get_int64()-now <= 200);
- // must throw an exception because 127.0.0.1 is in already banned suubnet range
+ // must throw an exception because 127.0.0.1 is in already banned subnet range
BOOST_CHECK_THROW(r = CallRPC(std::string("setban 127.0.0.1 add")), std::runtime_error);
BOOST_CHECK_NO_THROW(CallRPC(std::string("setban 127.0.0.0/24 remove")));
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 79d02257fa..5da4907f06 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -247,7 +247,7 @@ BOOST_AUTO_TEST_CASE(util_seed_insecure_rand)
for (int mod=2;mod<11;mod++)
{
int mask = 1;
- // Really rough binomal confidence approximation.
+ // Really rough binomial confidence approximation.
int err = 30*10000./mod*sqrt((1./mod*(1-1./mod))/10000.);
//mask is 2^ceil(log2(mod))-1
while(mask<mod-1)mask=(mask<<1)+1;
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index fb58208774..6e1d7a42b5 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -108,7 +108,7 @@ void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap &cachedDescendan
// vHashesToUpdate is the set of transaction hashes from a disconnected block
// which has been re-added to the mempool.
-// for each entry, look for descendants that are outside hashesToUpdate, and
+// for each entry, look for descendants that are outside vHashesToUpdate, and
// add fee/size information for such descendants to the parent.
// for each such descendant, also update the ancestor state to include the parent.
void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate)
diff --git a/src/txmempool.h b/src/txmempool.h
index f9a9d088d0..4222789510 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -552,12 +552,12 @@ public:
* new mempool entries may have children in the mempool (which is generally
* not the case when otherwise adding transactions).
* UpdateTransactionsFromBlock() will find child transactions and update the
- * descendant state for each transaction in hashesToUpdate (excluding any
- * child transactions present in hashesToUpdate, which are already accounted
- * for). Note: hashesToUpdate should be the set of transactions from the
+ * descendant state for each transaction in vHashesToUpdate (excluding any
+ * child transactions present in vHashesToUpdate, which are already accounted
+ * for). Note: vHashesToUpdate should be the set of transactions from the
* disconnected block that have been accepted back into the mempool.
*/
- void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate);
+ void UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate);
/** Try to calculate all in-mempool ancestors of entry.
* (these are all calculated including the tx itself)
diff --git a/src/validation.cpp b/src/validation.cpp
index be82026b3c..037b9c0abc 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3152,7 +3152,7 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
bool fTooFarAhead = (pindex->nHeight > int(chainActive.Height() + MIN_BLOCKS_TO_KEEP));
// TODO: Decouple this function from the block download logic by removing fRequested
- // This requires some new chain datastructure to efficiently look up if a
+ // This requires some new chain data structure to efficiently look up if a
// block is in a chain leading to a candidate for best tip, despite not
// being such a candidate itself.
diff --git a/src/validation.h b/src/validation.h
index 43f0dbae34..5f8e9a689c 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -314,7 +314,7 @@ void FlushStateToDisk();
/** Prune block files and flush state to disk. */
void PruneAndFlush();
/** Prune block files up to a given height */
-void PruneBlockFilesManual(int nPruneUpToHeight);
+void PruneBlockFilesManual(int nManualPruneHeight);
/** (try to) add transaction to memory pool
* plTxnReplaced will be appended to with all transactions replaced from mempool **/
diff --git a/src/validationinterface.h b/src/validationinterface.h
index a494eb6990..7f13a29d23 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -69,7 +69,12 @@ struct CMainSignals {
boost::signals2::signal<void (const uint256 &)> Inventory;
/** Tells listeners to broadcast their data. */
boost::signals2::signal<void (int64_t nBestBlockTime, CConnman* connman)> Broadcast;
- /** Notifies listeners of a block validation result */
+ /**
+ * Notifies listeners of a block validation result.
+ * If the provided CValidationState IsValid, the provided block
+ * is guaranteed to be the current best block at the time the
+ * callback was generated (not necessarily now)
+ */
boost::signals2::signal<void (const CBlock&, const CValidationState&)> BlockChecked;
/** Notifies listeners that a key for mining is required (coinbase) */
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;