From 27b0e0cc1b12e25234293c12750c0da85f921ac6 Mon Sep 17 00:00:00 2001 From: Fuzzbawls Date: Mon, 14 Aug 2023 19:24:44 -0700 Subject: [PATCH] [Lint] lint spelling --- build-aux/snap/snapcraft.yaml | 2 +- contrib/devtools/README.md | 2 +- contrib/linearize/example-linearize.cfg | 2 +- doc/gitian-building.md | 2 +- doc/gitian-building/docker-setup-windows.md | 2 +- doc/gitian-building/gitian-setup-fedora.md | 2 +- src/bench/perf.cpp | 2 +- src/bip38.cpp | 2 +- src/bls/bls_worker.cpp | 4 ++-- src/budget/budgetmanager.cpp | 4 ++-- src/budget/finalizedbudget.cpp | 2 +- src/ctpl_stl.h | 2 +- src/cuckoocache.h | 4 ++-- src/cxxtimer.h | 2 +- src/dbwrapper.cpp | 2 +- src/evo/providertx.cpp | 2 +- src/httpserver.cpp | 2 +- src/init.cpp | 2 +- src/libzerocoin/Coin.h | 2 +- src/libzerocoin/CoinSpend.h | 8 +++---- src/libzerocoin/Params.h | 4 ++-- src/libzerocoin/documentation/Doxyfile | 4 ++-- src/llmq/quorums.h | 2 +- src/llmq/quorums_dkgsessionhandler.cpp | 2 +- src/llmq/quorums_signing_shares.cpp | 4 ++-- src/merkleblock.cpp | 2 +- src/net_processing.cpp | 2 +- src/netbase.cpp | 2 +- src/policy/fees.h | 6 ++--- src/qt/CMakeLists.txt | 2 +- src/qt/addresstablemodel.h | 2 +- src/qt/askpassphrasedialog.cpp | 4 ++-- src/qt/bantablemodel.cpp | 2 +- src/qt/bitcoinunits.cpp | 6 ++--- src/qt/forms/rpcconsole.ui | 2 +- src/qt/guiutil.cpp | 4 ++-- src/qt/guiutil.h | 2 +- src/qt/optionsmodel.cpp | 2 +- src/qt/optionsmodel.h | 2 +- src/qt/peertablemodel.cpp | 2 +- src/qt/pivx/coldstakingwidget.cpp | 2 +- src/qt/res/css/default.css | 4 ++-- src/qt/rpcconsole.cpp | 4 ++-- src/qt/transactionrecord.cpp | 2 +- src/qt/transactionrecord.h | 2 +- src/qt/walletmodel.cpp | 2 +- src/rpc/blockchain.cpp | 2 +- src/rpc/budget.cpp | 4 ++-- src/rpc/client.cpp | 2 +- src/rpc/net.cpp | 2 +- src/rpc/rpcquorums.cpp | 6 ++--- src/scheduler.h | 2 +- src/script/descriptor.cpp | 4 ++-- src/script/ismine.h | 2 +- src/support/lockedpool.h | 2 +- src/test/addrman_tests.cpp | 2 +- src/test/data/script_tests.json | 2 +- src/test/data/tx_invalid.json | 2 +- src/test/data/tx_valid.json | 2 +- src/test/evo_deterministicmns_tests.cpp | 2 +- src/test/librust/sapling_wallet_tests.cpp | 2 +- src/test/merkle_tests.cpp | 2 +- src/test/sighash_tests.cpp | 2 +- src/test/util_tests.cpp | 6 ++--- src/txmempool.cpp | 2 +- src/txmempool.h | 4 ++-- src/utilstrencodings.h | 2 +- src/validation.cpp | 4 ++-- src/wallet/db.cpp | 2 +- src/wallet/rpcdump.cpp | 2 +- src/wallet/rpcwallet.cpp | 6 ++--- src/wallet/walletdb.h | 2 +- test/functional/example_test.py | 4 ++-- test/functional/feature_block.py | 2 +- .../mining_getblocktemplate_longpoll.py | 8 +++---- test/functional/mining_pos_fakestake.py | 2 +- test/functional/p2p_invalid_tx.py | 2 +- test/functional/rpc_fundrawtransaction.py | 18 +++++++-------- test/functional/sapling_wallet_persistence.py | 2 +- test/functional/test_framework/messages.py | 2 +- .../test_framework/test_framework.py | 2 +- test/functional/test_framework/test_node.py | 2 +- test/functional/tiertwo_deterministicmns.py | 2 +- test/functional/tiertwo_reorg_mempool.py | 2 +- test/functional/tiertwo_signing_session.py | 10 ++++---- test/functional/wallet_basic.py | 2 +- test/functional/wallet_keypool_topup.py | 2 +- test/lint/lint-spelling.ignore-words.txt | 23 +++++++++++++++++++ test/lint/lint-spelling.sh | 21 +++++++++++++++++ 89 files changed, 174 insertions(+), 130 deletions(-) create mode 100644 test/lint/lint-spelling.ignore-words.txt create mode 100755 test/lint/lint-spelling.sh diff --git a/build-aux/snap/snapcraft.yaml b/build-aux/snap/snapcraft.yaml index 98eafedc53e95..cb4f0355259ac 100644 --- a/build-aux/snap/snapcraft.yaml +++ b/build-aux/snap/snapcraft.yaml @@ -284,7 +284,7 @@ parts: fi echo "-----------------------------------------------" echo "+++++++++++++++++++++++++++++++++++++++++++++++" - echo "INSTALATION OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}-snap has finished" # List installed files and vars when installation is finished + echo "INSTALLATION OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}-snap has finished" # List installed files and vars when installation is finished echo "+++++++++++++++++++++++++++++++++++++++++++++++" if [ $EXTRALOG = 1 ]; then find ${SNAPCRAFT_PART_INSTALL} -type f diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 3cc732b8a7b71..af8d29714a5b0 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -144,7 +144,7 @@ Then do: Create and verify timestamps of merge commits --------------------------------------------- To create or verify timestamps on the merge commits, install the OpenTimestamps -client via `pip3 install opentimestamps-client`. Then, dowload the gpg wrapper +client via `pip3 install opentimestamps-client`. Then, download the gpg wrapper `ots-git-gpg-wrapper.sh` and set it as git's `gpg.program`. See [the ots git integration documentation](https://github.com/opentimestamps/opentimestamps-client/blob/master/doc/git-integration.md#usage) for further details. diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index 13f61e5b704a1..0f9d1294a917e 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -15,5 +15,5 @@ output_file=/home/example/Downloads/bootstrap.dat hashlist=hashlist.txt split_year=1 -# Maxmimum size in bytes of out-of-order blocks cache in memory +# Maximum size in bytes of out-of-order blocks cache in memory out_of_order_cache_sz = 100000000 diff --git a/doc/gitian-building.md b/doc/gitian-building.md index 0d9a4999b613a..979faf4bf69f4 100644 --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -101,7 +101,7 @@ The build process results in a number of `.assert` files in your local gitian.si Signing Externally -------------------- -If your gitian host does not have your GPG private key installed, you will need to copy these uncommited changes to your host machine, where you can sign them: +If your gitian host does not have your GPG private key installed, you will need to copy these uncommitted changes to your host machine, where you can sign them: ```bash gpg --output ${VERSION}-linux/${NAME}/pivx-linux-${VERSION%\.*}-build.assert.sig --detach-sign ${VERSION}-linux/$NAME/pivx-linux-${VERSION%\.*}-build.assert diff --git a/doc/gitian-building/docker-setup-windows.md b/doc/gitian-building/docker-setup-windows.md index 93acd21969f68..e969e07ddc1a1 100644 --- a/doc/gitian-building/docker-setup-windows.md +++ b/doc/gitian-building/docker-setup-windows.md @@ -67,6 +67,6 @@ Below are examples that will need to be adjusted to suit your specific machine, Proceed to WSL Installation ------------------------------- -Thats all you need to do for Docker for Windows installation and configuration. +That's all you need to do for Docker for Windows installation and configuration. Proceed to [WSL Installation](./wsl-setup-windows.md) for instructions on Installing and configuring WSL. \ No newline at end of file diff --git a/doc/gitian-building/gitian-setup-fedora.md b/doc/gitian-building/gitian-setup-fedora.md index debbffadd556b..08c8df7022c4a 100644 --- a/doc/gitian-building/gitian-setup-fedora.md +++ b/doc/gitian-building/gitian-setup-fedora.md @@ -46,7 +46,7 @@ CentOS still ships with Python 2.7, which is incompatible with the gitian-build. Like as with Python, CentOS ships with an ancient version of Git (1.8.x), which is also not compatible with the gitian-build.py script. The script will detect the old version, and automatically update the system to a newer version of Git. -If you are currently using the default system Git in other work flows, you may need to learn about whats changed in recent versions of Git. +If you are currently using the default system Git in other work flows, you may need to learn about what's changed in recent versions of Git. #### Configuring Git diff --git a/src/bench/perf.cpp b/src/bench/perf.cpp index 1f43e5d3ac6f1..a549ec29eaafd 100644 --- a/src/bench/perf.cpp +++ b/src/bench/perf.cpp @@ -6,7 +6,7 @@ #if defined(__i386__) || defined(__x86_64__) -/* These architectures support quering the cycle counter +/* These architectures support querying the cycle counter * from user space, no need for any syscall overhead. */ void perf_init(void) { } diff --git a/src/bip38.cpp b/src/bip38.cpp index 512bf6f6e3d02..71fa3843de414 100644 --- a/src/bip38.cpp +++ b/src/bip38.cpp @@ -23,7 +23,7 @@ static bool Base58ToHex(const std::string& base58_str, std::string& hex_str) if (!DecodeBase58(base58_str.c_str(), vchKey, key_size) || vchKey.size() != key_size) { return false; } - // Hex enconding + // Hex encoding std::stringstream ss; ss << std::hex; for (unsigned int i = 0; i < vchKey.size(); i++) { diff --git a/src/bls/bls_worker.cpp b/src/bls/bls_worker.cpp index 07528e94a4472..a90bc93eaf58b 100644 --- a/src/bls/bls_worker.cpp +++ b/src/bls/bls_worker.cpp @@ -409,13 +409,13 @@ struct ContributionVerifier : public std::enable_shared_from_this > aggDone; // we can't directly update a vector in parallel // as vector is not thread safe (uses bitsets internally) - // so we must use vector temporarely and concatenate/convert + // so we must use vector temporarily and concatenate/convert // each batch result into a final vector std::vector verifyResults; }; diff --git a/src/budget/budgetmanager.cpp b/src/budget/budgetmanager.cpp index 9cf51d3b9133b..491ca5839aa99 100644 --- a/src/budget/budgetmanager.cpp +++ b/src/budget/budgetmanager.cpp @@ -427,7 +427,7 @@ void CBudgetManager::RemoveByFeeTxId(const uint256& feeTxId) if (p) { LogPrintf("%s: Removing proposal %s (collateral disconnected, id=%s)\n", __func__, p->GetName(), feeTxId.ToString()); { - // Erase seen/orhpan votes + // Erase seen/orphan votes LOCK(cs_votes); for (const auto& vote: p->GetVotes()) { const uint256& hash{vote.second.GetHash()}; @@ -453,7 +453,7 @@ void CBudgetManager::RemoveByFeeTxId(const uint256& feeTxId) if (b) { LogPrintf("%s: Removing finalized budget %s (collateral disconnected, id=%s)\n", __func__, b->GetName(), feeTxId.ToString()); { - // Erase seen/orhpan votes + // Erase seen/orphan votes LOCK(cs_finalizedvotes); for (const uint256& hash: b->GetVotesHashes()) { mapSeenFinalizedBudgetVotes.erase(hash); diff --git a/src/budget/finalizedbudget.cpp b/src/budget/finalizedbudget.cpp index dc2cf33a50af0..8ec9eb4cd1fc2 100644 --- a/src/budget/finalizedbudget.cpp +++ b/src/budget/finalizedbudget.cpp @@ -350,7 +350,7 @@ TrxValidationStatus CFinalizedBudget::IsTransactionValid(const CTransaction& txN // Search the payment const CScript& scriptExpected = vecBudgetPayments[nCurrentBudgetPayment].payee; const CAmount& amountExpected = vecBudgetPayments[nCurrentBudgetPayment].nAmount; - // Budget payment is usually the last output of coinstake txes, iterate backwords + // Budget payment is usually the last output of coinstake txes, iterate backwards for (auto out = txNew.vout.rbegin(); out != txNew.vout.rend(); ++out) { LogPrint(BCLog::MNBUDGET,"%s: nCurrentBudgetPayment=%d, payee=%s == out.scriptPubKey=%s, amount=%ld == out.nValue=%ld\n", __func__, nCurrentBudgetPayment, HexStr(scriptExpected), HexStr(out->scriptPubKey), amountExpected, out->nValue); diff --git a/src/ctpl_stl.h b/src/ctpl_stl.h index 14a2f46f0e57c..7d4de240e38db 100644 --- a/src/ctpl_stl.h +++ b/src/ctpl_stl.h @@ -184,7 +184,7 @@ namespace ctpl { } // run the user's function that excepts argument int - id of the running thread. returned value is templatized - // operator returns std::future, where the user can get the result and rethrow the catched exceptins + // operator returns std::future, where the user can get the result and rethrow the caught exceptions template auto push(F && f) ->std::future { auto pck = std::make_shared>(std::forward(f)); diff --git a/src/cuckoocache.h b/src/cuckoocache.h index 20c0193856cad..a2d92455837df 100644 --- a/src/cuckoocache.h +++ b/src/cuckoocache.h @@ -257,7 +257,7 @@ class cache * * First, epoch_check decrements and checks the cheap heuristic, and then does * a more expensive scan if the cheap heuristic runs out. If the expensive - * scan suceeds, the epochs are aged and old elements are allow_erased. The + * scan succeeds, the epochs are aged and old elements are allow_erased. The * cheap heuristic is reset to retrigger after the worst case growth of the * current epoch's elements would exceed the epoch_size. */ @@ -395,7 +395,7 @@ class cache * 1) On first iteration, last_loc == invalid(), find returns last, so * last_loc defaults to locs[0]. * 2) On further iterations, where last_loc == locs[k], last_loc will - * go to locs[k+1 % 8], i.e., next of the 8 indicies wrapping around + * go to locs[k+1 % 8], i.e., next of the 8 indices wrapping around * to 0 if needed. * * This prevents moving the element we just put in. diff --git a/src/cxxtimer.h b/src/cxxtimer.h index c1e5933d03760..cee63357f7dcb 100644 --- a/src/cxxtimer.h +++ b/src/cxxtimer.h @@ -59,7 +59,7 @@ class Timer { * Transfer constructor. * * @param other - * The object to be transfered. + * The object to be transferred. */ Timer(Timer&& other) = default; diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index 323ec025cc62e..091c6c0ef3e4e 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -17,7 +17,7 @@ static void SetMaxOpenFiles(leveldb::Options *options) { // do not interfere with select() loops. On 64-bit Unix hosts this value is // also OK, because up to that amount LevelDB will use an mmap // implementation that does not use extra file descriptors (the fds are - // closed after being mmaped). + // closed after being mapped). // // Increasing the value beyond the default is dangerous because LevelDB will // fall back to a non-mmap implementation when the file count is too large. diff --git a/src/evo/providertx.cpp b/src/evo/providertx.cpp index 461f55cd6d8a5..ca836cb848948 100644 --- a/src/evo/providertx.cpp +++ b/src/evo/providertx.cpp @@ -17,7 +17,7 @@ std::string ProRegPL::MakeSignString() const ss << EncodeDestination(keyIDOwner) << "|"; ss << EncodeDestination(keyIDVoting) << "|"; - // ... and also the full hash of the payload as a protection agains malleability and replays + // ... and also the full hash of the payload as a protection against malleability and replays ss << ::SerializeHash(*this).ToString(); return ss.str(); diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 146ac2f89593d..3281107408bf5 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -405,7 +405,7 @@ bool InitHTTPServer() LogPrintf("HTTP: creating work queue of depth %d\n", workQueueDepth); workQueue = new WorkQueue(workQueueDepth); - // tranfer ownership to eventBase/HTTP via .release() + // transfer ownership to eventBase/HTTP via .release() eventBase = base_ctr.release(); eventHTTP = http_ctr.release(); return true; diff --git a/src/init.cpp b/src/init.cpp index 052960c5577ef..22eb3529d03e0 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1255,7 +1255,7 @@ bool AppInitMain() if (gArgs.GetBoolArg("-resync", false)) { uiInterface.InitMessage(_("Preparing for resync...")); - // Delete the local blockchain folders to force a resync from scratch to get a consitent blockchain-state + // Delete the local blockchain folders to force a resync from scratch to get a consistent blockchain-state fs::path blocksDir = GetBlocksDir(); fs::path chainstateDir = GetDataDir() / "chainstate"; fs::path sporksDir = GetDataDir() / "sporks"; diff --git a/src/libzerocoin/Coin.h b/src/libzerocoin/Coin.h index 12e0480c27232..041b923b529cc 100644 --- a/src/libzerocoin/Coin.h +++ b/src/libzerocoin/Coin.h @@ -57,7 +57,7 @@ class PublicCoin /**Generates a public coin * - * @param p cryptographic paramters + * @param p cryptographic parameters * @param coin the value of the commitment. * @param denomination The denomination of the coin. */ diff --git a/src/libzerocoin/CoinSpend.h b/src/libzerocoin/CoinSpend.h index 7e5528994917d..994968b697d51 100644 --- a/src/libzerocoin/CoinSpend.h +++ b/src/libzerocoin/CoinSpend.h @@ -27,7 +27,7 @@ namespace libzerocoin { -// Lagacy zPIV - Only for serialization +// Legacy zPIV - Only for serialization // Proof that a value inside a commitment C is accumulated in accumulator A class AccumulatorProofOfKnowledge { public: @@ -46,7 +46,7 @@ class AccumulatorProofOfKnowledge { CBigNum s_xi, s_phi, s_gamma, s_psi; }; -// Lagacy zPIV - Only for serialization +// Legacy zPIV - Only for serialization // Signature of knowledge attesting that the signer knows the values to // open a commitment to a coin with given serial number class SerialNumberSignatureOfKnowledge { @@ -59,7 +59,7 @@ class SerialNumberSignatureOfKnowledge { std::vector sprime; }; -// Lagacy zPIV - Only for serialization +// Legacy zPIV - Only for serialization // Proof that two commitments open to the same value (BROKEN) class CommitmentProofOfKnowledge { public: @@ -70,7 +70,7 @@ class CommitmentProofOfKnowledge { }; -// Lagacy zPIV - Only for serialization +// Legacy zPIV - Only for serialization /** The complete proof needed to spend a zerocoin. * Composes together a proof that a coin is accumulated * and that it has a given serial number. diff --git a/src/libzerocoin/Params.h b/src/libzerocoin/Params.h index d7a1a35ff475b..1660926003b4b 100644 --- a/src/libzerocoin/Params.h +++ b/src/libzerocoin/Params.h @@ -91,7 +91,7 @@ class AccumulatorAndProofParams { /** * The initial value for the accumulator - * A random Quadratic residue mod n thats not 1 + * A random Quadratic residue mod n that's not 1 */ CBigNum accumulatorBase; @@ -102,7 +102,7 @@ class AccumulatorAndProofParams { CBigNum minCoinValue; /** - * Upper bound on the value for a comitted coin. + * Upper bound on the value for a committed coin. * Required by the accumulator proof. */ CBigNum maxCoinValue; diff --git a/src/libzerocoin/documentation/Doxyfile b/src/libzerocoin/documentation/Doxyfile index 50123473dc093..54518ed9ac936 100644 --- a/src/libzerocoin/documentation/Doxyfile +++ b/src/libzerocoin/documentation/Doxyfile @@ -926,7 +926,7 @@ HTML_STYLESHEET = # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more +# since it does not replace the standard style sheet and is therefore more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. @@ -1736,7 +1736,7 @@ UML_LOOK = NO # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more -# managable. Set this to 0 for no limit. Note that the threshold may be +# manageable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 diff --git a/src/llmq/quorums.h b/src/llmq/quorums.h index 05435e4fd9fe1..1aca3ef8f9319 100644 --- a/src/llmq/quorums.h +++ b/src/llmq/quorums.h @@ -20,7 +20,7 @@ class CDKGSessionManager; /** * An object of this class represents a quorum which was mined on-chain (through a quorum commitment) - * It at least contains informations about the members and the quorum public key which is needed to verify recovered + * It at least contains information about the members and the quorum public key which is needed to verify recovered * signatures from this quorum. * * In case the local node is a member of the same quorum and successfully participated in the DKG, the quorum object diff --git a/src/llmq/quorums_dkgsessionhandler.cpp b/src/llmq/quorums_dkgsessionhandler.cpp index 9322ef3bc07bb..c8630f00e0b3e 100644 --- a/src/llmq/quorums_dkgsessionhandler.cpp +++ b/src/llmq/quorums_dkgsessionhandler.cpp @@ -172,7 +172,7 @@ bool CDKGSessionHandler::InitNewQuorum(const CBlockIndex* pindexQuorum) auto mns = deterministicMNManager->GetAllQuorumMembers(params.type, pindexQuorum); if (!curSession->Init(pindexQuorum, mns, activeMasternodeManager->GetProTx())) { - LogPrintf("CDKGSessionHandler::%s -- quorum initialiation failed for %s\n", __func__, curSession->params.name); + LogPrintf("CDKGSessionHandler::%s -- quorum initialization failed for %s\n", __func__, curSession->params.name); return false; } diff --git a/src/llmq/quorums_signing_shares.cpp b/src/llmq/quorums_signing_shares.cpp index 41a46465dcc8b..5d398503fc945 100644 --- a/src/llmq/quorums_signing_shares.cpp +++ b/src/llmq/quorums_signing_shares.cpp @@ -752,7 +752,7 @@ void CSigSharesManager::CollectSigSharesToRequest(std::map doneSessions; for (auto& p : sigShares) { if (doneSessions.count(p.second.GetSignHash())) { diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp index 865442848ac62..0c7dc8ddb8f33 100644 --- a/src/merkleblock.cpp +++ b/src/merkleblock.cpp @@ -163,7 +163,7 @@ uint256 CPartialMerkleTree::ExtractMatches(std::vector& vMatch) // traverse the partial tree unsigned int nBitsUsed = 0, nHashUsed = 0; uint256 hashMerkleRoot = TraverseAndExtract(nHeight, 0, nBitsUsed, nHashUsed, vMatch); - // verify that no problems occured during the tree traversal + // verify that no problems occurred during the tree traversal if (fBad) return UINT256_ZERO; // verify that all bits were consumed (except for the padding caused by serializing it as a byte sequence) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 001a92b6bc9c2..166fbca88847b 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1116,7 +1116,7 @@ void static ProcessGetBlockData(CNode* pfrom, const CInv& inv, CConnman* connman connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::MERKLEBLOCK, merkleBlock)); // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see // This avoids hurting performance by pointlessly requiring a round-trip - // Note that there is currently no way for a node to request any single transactions we didnt send here - + // Note that there is currently no way for a node to request any single transactions we didn't send here - // they must either disconnect and retry or request the full block. // Thus, the protocol spec specified allows for us to provide duplicate txn here, // however we MUST always provide at least what the remote peer needs diff --git a/src/netbase.cpp b/src/netbase.cpp index 6d4fc8e126ed1..290c57f348d62 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -418,7 +418,7 @@ bool static Socks5(std::string strDest, int port, const ProxyCredentials *auth, return error("Error reading proxy authentication response"); } if (pchRetA[0] != 0x01 || pchRetA[1] != 0x00) { - return error("Proxy authentication unsuccesful"); + return error("Proxy authentication unsuccessful"); } } else if (pchRet1[1] == SOCKS5Method::NOAUTH) { // Perform no authentication diff --git a/src/policy/fees.h b/src/policy/fees.h index 86516c31105f4..21f358894f73e 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -78,13 +78,13 @@ class TxConfirmStats // Count the total # of txs in each bucket // Track the historical moving average of this total over blocks std::vector txCtAvg; - // and calcuate the total for the current block to update the moving average + // and calculate the total for the current block to update the moving average std::vector curBlockTxCt; // Count the total # of txs confirmed within Y blocks in each bucket - // Track the historical moving average of theses totals over blocks + // Track the historical moving average of these totals over blocks std::vector > confAvg; // confAvg[Y][X] - // and calcuate the totals for the current block to update the moving averages + // and calculate the totals for the current block to update the moving averages std::vector > curBlockConf; // curBlockConf[Y][X] // Sum the total feerate of all tx's in each bucket diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 8d236b43e3737..6635ecbe12d06 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -21,7 +21,7 @@ foreach(comp Widgets Core Gui Network LinguistTools DBus Svg Charts) add_definitions(${Qt5${comp}_DEFINITIONS}) list(APPEND Qt5_LIBRARIES ${Qt5${comp}_LIBRARIES}) else() - MESSAGE(WARNING "Cant find Qt5${comp}") + MESSAGE(WARNING "Can't find Qt5${comp}") endif() endforeach(comp) diff --git a/src/qt/addresstablemodel.h b/src/qt/addresstablemodel.h index 299ed04bf4881..67079a3a04f8f 100644 --- a/src/qt/addresstablemodel.h +++ b/src/qt/addresstablemodel.h @@ -40,7 +40,7 @@ class AddressTableModel : public QAbstractTableModel enum EditStatus { OK, /**< Everything ok */ NO_CHANGES, /**< No changes were made during edit operation */ - INVALID_ADDRESS, /**< Unparseable address */ + INVALID_ADDRESS, /**< Unparsable address */ DUPLICATE_ADDRESS, /**< Address already in address book */ WALLET_UNLOCK_FAILURE, /**< Wallet could not be unlocked to create new receiving address */ KEY_GENERATION_FAILURE /**< Generating a new public key for a receiving address failed */ diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 7944f01d8bb32..ee0c9c837710f 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -249,7 +249,7 @@ void AskPassphraseDialog::textChanged() switch (mode) { case Mode::Encrypt: // New passphrase x2 acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty() && // Passphrases are not empty - ui->passEdit2->text() == ui->passEdit3->text(); // Passphrases match eachother + ui->passEdit2->text() == ui->passEdit3->text(); // Passphrases match each other break; case Mode::UnlockAnonymize: // Old passphrase x1 case Mode::Unlock: // Old passphrase x1 @@ -258,7 +258,7 @@ void AskPassphraseDialog::textChanged() break; case Mode::ChangePass: // Old passphrase x1, new passphrase x2 acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty() && // New passphrases are not empty - ui->passEdit2->text() == ui->passEdit3->text() && // New passphrases match eachother + ui->passEdit2->text() == ui->passEdit3->text() && // New passphrases match each other !ui->passEdit1->text().isEmpty(); // Old passphrase is not empty break; } diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index 27450c8e38be1..11f431caba3ab 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -65,7 +65,7 @@ class BanTablePriv } if (sortColumn >= 0) - // sort cachedBanlist (use stable sort to prevent rows jumping around unneceesarily) + // sort cachedBanlist (use stable sort to prevent rows jumping around unnecessarily) std::stable_sort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder)); } diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 85a8bb2f2f285..96ec119deff49 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -225,9 +225,9 @@ QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussi if (!cleanRemainderZeros) { result.chop(decimals(unit) - digits); } else { - int lenght = result.mid(result.indexOf("."), result.length() - 1).length() - 1; - if (lenght > digits) { - result.chop(lenght - digits); + int length = result.mid(result.indexOf("."), result.length() - 1).length() - 1; + if (length > digits) { + result.chop(length - digits); } } } diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index c9d1e33cc6978..abdc51c52ae9a 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -1245,7 +1245,7 @@ - The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions. + The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockchain files or missing/obsolete transactions. true diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 4d6195a897eb4..692920cd0cdd7 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -626,7 +626,7 @@ void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize, parent->move(pos); } -// Check whether a theme is not build-in +// Check whether a theme is not built-in bool isExternal(QString theme) { if (theme.isEmpty()) @@ -649,7 +649,7 @@ QString loadStyleSheet() fs::path pathAddr = GetDataDir() / "themes/"; cssName = pathAddr.string().c_str() + theme + "/css/theme.css"; } else { - // Build-in CSS + // Built-in CSS settings.setValue("fCSSexternal", false); if (!theme.isEmpty()) { cssName = QString(":/css/") + theme; diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index be40fed2de532..dc11b33d9bebb 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -177,7 +177,7 @@ void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSizeIn /** Load global CSS theme */ QString loadStyleSheet(); -/** Check whether a theme is not build-in */ +/** Check whether a theme is not built-in */ bool isExternal(QString theme); /* Convert QString to OS specific boost path through UTF-8 */ diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index bf51fe6cc69b2..0284e4731c99d 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -225,7 +225,7 @@ void OptionsModel::Reset() // Remove all entries from our QSettings object settings.clear(); - resetSettings = true; // Needed in pivx.cpp during shotdown to also remove the window positions + resetSettings = true; // Needed in pivx.cpp during shutdown to also remove the window positions // default setting for OptionsModel::StartAtStartup - disabled if (GUIUtil::GetStartOnSystemStartup()) diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index 787ed0ed8b17f..b04e915d26c79 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -111,7 +111,7 @@ class OptionsModel : public QAbstractListModel bool fHideCharts; bool fHideZeroBalances; bool fHideOrphans; - /* settings that were overriden by command-line */ + /* settings that were overridden by command-line */ QString strOverriddenByCommandLine; /// Add option to list of GUI options overridden through command line/config file diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index c5d59cadbd970..510eb103aff2d 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -83,7 +83,7 @@ class PeerTablePriv } if (sortColumn >= 0) - // sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily) + // sort cacheNodeStats (use stable sort to prevent rows jumping around unnecessarily) std::stable_sort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder)); // build index map diff --git a/src/qt/pivx/coldstakingwidget.cpp b/src/qt/pivx/coldstakingwidget.cpp index 39484689ae41a..cadb9263f4660 100644 --- a/src/qt/pivx/coldstakingwidget.cpp +++ b/src/qt/pivx/coldstakingwidget.cpp @@ -483,7 +483,7 @@ void ColdStakingWidget::onSendClicked() QList recipients; recipients.append(dest); - // Prepare transaction for getting txFee earlier (exlude delegated coins) + // Prepare transaction for getting txFee earlier (exclude delegated coins) WalletModelTransaction currentTransaction(recipients); WalletModel::SendCoinsReturn prepareStatus = walletModel->prepareTransaction(¤tTransaction, coinControlDialog->coinControl, false); diff --git a/src/qt/res/css/default.css b/src/qt/res/css/default.css index a225f6af3f322..d7dca6aa9335b 100755 --- a/src/qt/res/css/default.css +++ b/src/qt/res/css/default.css @@ -4,11 +4,11 @@ /* transparent-purple: #e9e7ef (for inactive backgrounds) */ /* */ /* light-purple1: #b396f6 (main purple for white backgrounds) */ -/* light-purple2: #9179c7 (sligtly darker for gradients) */ +/* light-purple2: #9179c7 (slightly darker for gradients) */ /* */ /* medium-purple1: #6f5ca3 (on hover) */ /* medium-purple1: #5c4c7c (main purple for dark backgrounds) */ -/* medium-purple2: #5b4c86 (sligtly darker for gradients) */ +/* medium-purple2: #5b4c86 (slightly darker for gradients) */ /* */ /* fuchsia: #df1cca */ /* background: #f8f6f6 */ diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index ac6d94295e2f4..6cb89f20e84f2 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -419,7 +419,7 @@ void RPCConsole::clear() void RPCConsole::reject() { - // Ignore escape keypress if this is not a seperate window + // Ignore escape keypress if this is not a separate window if (windowType() != Qt::Widget) QDialog::reject(); } @@ -671,7 +671,7 @@ void RPCConsole::peerLayoutChanged() int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeid); if (detailNodeRow < 0) { - // detail node dissapeared from table (node disconnected) + // detail node disappeared from table (node disconnected) fUnselect = true; } else { if (detailNodeRow != selectedRow) { diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index afe1c037f41f2..cd0c17a7ec116 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -559,7 +559,7 @@ void TransactionRecord::loadHotOrColdStakeOrContract( // Wallet delegating balance record.type = TransactionRecord::P2CSDelegationSentOwner; } else if (isFromMe){ - // Wallet delegating balance and transfering ownership + // Wallet delegating balance and transferring ownership record.type = TransactionRecord::P2CSDelegationSent; } else { // Wallet receiving a delegation diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index a803c99281fda..f3e75479165a7 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -98,7 +98,7 @@ class TransactionRecord P2CSUnlockStaker, // Staker watching the owner spent the delegated utxo SendToShielded, // Shielded send RecvWithShieldedAddress, // Shielded receive - RecvWithShieldedAddressMemo, // Shielded recieve with memo + RecvWithShieldedAddressMemo, // Shielded receive with memo SendToSelfShieldedAddress, // Shielded send to self SendToSelfShieldToTransparent, // Unshield coins to self SendToSelfShieldToShieldChangeAddress, // Changing coins from one shielded address to another inside the wallet. diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 376fc4a08cd6a..88f685bb23964 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -368,7 +368,7 @@ CAmount WalletModel::getWalletStakeSplitThreshold() const return wallet->GetStakeSplitThreshold(); } -/* returns default minimum value for stake split threshold as doulbe */ +/* returns default minimum value for stake split threshold as double */ double WalletModel::getSSTMinimum() const { return static_cast(CWallet::minStakeSplitThreshold) / COIN; diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index c6767903d7d4c..3691efc712c32 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1399,7 +1399,7 @@ UniValue getblockindexstats(const JSONRPCRequest& request) { // Shield inputs nValueIn += tx.GetShieldedValueIn(); - // Tranparent/Shield outputs + // Transparent/Shield outputs nValueOut += tx.GetValueOut(); // update fee diff --git a/src/rpc/budget.cpp b/src/rpc/budget.cpp index c47978e858a9f..5073ec9c70f50 100644 --- a/src/rpc/budget.cpp +++ b/src/rpc/budget.cpp @@ -537,7 +537,7 @@ UniValue mnfinalbudgetsuggest(const JSONRPCRequest& request) throw std::runtime_error( "mnfinalbudgetsuggest\n" "\nTry to submit a budget finalization\n" - "returns the budget hash if it was broadcasted sucessfully"); + "returns the budget hash if it was broadcasted successfully"); if (!Params().IsRegTestNet()) { throw JSONRPCError(RPC_MISC_ERROR, "command available only for RegTest network"); @@ -553,7 +553,7 @@ UniValue createrawmnfinalbudget(const JSONRPCRequest& request) throw std::runtime_error( "createrawmnfinalbudget\n" "\nTry to submit the raw budget finalization\n" - "returns the budget hash if it was broadcasted sucessfully" + "returns the budget hash if it was broadcasted successfully" "\nArguments:\n" "1. \"budgetname\" (string, required) finalization name\n" "2. \"blockstart\" (numeric, required) superblock height\n" diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index e714a5e537c97..05ad24f006ab8 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -21,7 +21,7 @@ class CRPCConvertParam // clang-format off /** - * Specifiy a (method, idx, name) here if the argument is a non-string RPC + * Specify a (method, idx, name) here if the argument is a non-string RPC * argument and needs to be converted from JSON. * * @note Parameter indexes start from 0. diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index b898ee4d40dae..ad3471ff5bf57 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -152,7 +152,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request) obj.pushKV("pingwait", stats.dPingWait); obj.pushKV("version", stats.nVersion); // Use the sanitized form of subver here, to avoid tricksy remote peers from - // corrupting or modifiying the JSON output by putting special characters in + // corrupting or modifying the JSON output by putting special characters in // their ver message. obj.pushKV("subver", stats.cleanSubVer); obj.pushKV("inbound", stats.fInbound); diff --git a/src/rpc/rpcquorums.cpp b/src/rpc/rpcquorums.cpp index e1929bb6fd9b7..6062f719414ab 100644 --- a/src/rpc/rpcquorums.cpp +++ b/src/rpc/rpcquorums.cpp @@ -30,7 +30,7 @@ UniValue signsession(const JSONRPCRequest& request) "3. \"msgHash\" (string, required) Message hash.\n" "\nResult:\n" - "n (bool) True if the sign was succesfull false otherwise\n" + "n (bool) True if the sign was successful, false otherwise\n" "\nExample:\n" + HelpExampleRpc("signsession", "100 \"xxx\", \"xxx\"") + HelpExampleCli("signsession", "100 \"xxx\", \"xxx\"")); @@ -168,12 +168,12 @@ UniValue getquoruminfo(const JSONRPCRequest& request) " {\n" " \"proTxHash\": \"proTxHash\" (string) ProTxHash of the quorum member\n" " \"valid\": true/false (boolean) True/false if the member is valid/invalid\n" - " \"pubKeyShare\": pubKeyShare (string) Quorum public key share of the member, will be outputed only if the command is performed by another quorum member or watcher\n" + " \"pubKeyShare\": pubKeyShare (string) Quorum public key share of the member, will be outputted only if the command is performed by another quorum member or watcher\n" " },\n" " ...\n" " ],\n" " \"quorumPublicKey\": quorumPublicKey, (string) Public key of the quorum\n" - " \"secretKeyShare\": secretKeyShare (string) This is outputed only if includeSkShare=true and the command is performed by a valid member of the quorum. It corresponds to the secret key share of that member\n" + " \"secretKeyShare\": secretKeyShare (string) This is outputted only if includeSkShare=true and the command is performed by a valid member of the quorum. It corresponds to the secret key share of that member\n" "}\n" "\nExample:\n" + diff --git a/src/scheduler.h b/src/scheduler.h index c36c8b829004f..c2b1b4a2857a5 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -113,7 +113,7 @@ class SingleThreadedSchedulerClient { /** * Add a callback to be executed. Callbacks are executed serially * and memory is release-acquire consistent between callback executions. - * Practially, this means that callbacks can behave as if they are executed + * Practically, this means that callbacks can behave as if they are executed * in order by a single thread. */ void AddToProcessQueue(std::function func); diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index d31e646fa7759..e5476a83a91ce 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -363,7 +363,7 @@ enum class ParseScriptContext { P2SH, }; -/** Parse a constant. If succesful, sp is updated to skip the constant and return true. */ +/** Parse a constant. If successful, sp is updated to skip the constant and return true. */ bool Const(const std::string& str, Span& sp) { if ((size_t)sp.size() >= str.size() && std::equal(str.begin(), str.end(), sp.begin())) { @@ -373,7 +373,7 @@ bool Const(const std::string& str, Span& sp) return false; } -/** Parse a function call. If succesful, sp is updated to be the function's argument(s). */ +/** Parse a function call. If successful, sp is updated to be the function's argument(s). */ bool Func(const std::string& str, Span& sp) { if ((size_t)sp.size() >= str.size() + 2 && sp[str.size()] == '(' && sp[sp.size() - 1] == ')' && std::equal(str.begin(), str.end(), sp.begin())) { diff --git a/src/script/ismine.h b/src/script/ismine.h index fe13b4cfaa295..565824af8618f 100644 --- a/src/script/ismine.h +++ b/src/script/ismine.h @@ -43,7 +43,7 @@ isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); isminetype IsMine(const CKeyStore& keystore, const libzcash::SaplingPaymentAddress& pa); isminetype IsMine(const CKeyStore& keystore, const CWDestination& dest); /** - * Cachable amount subdivided into watchonly and spendable parts. + * Cacheable amount subdivided into watchonly and spendable parts. */ struct CachableAmount { diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h index 4571a85594c17..4e65357d6985f 100644 --- a/src/support/lockedpool.h +++ b/src/support/lockedpool.h @@ -119,7 +119,7 @@ class Arena * An arena manages a contiguous region of memory. The pool starts out with one arena * but can grow to multiple arenas if the need arises. * - * Unlike a normal C heap, the administrative structures are seperate from the managed + * Unlike a normal C heap, the administrative structures are separate from the managed * memory. This has been done as the sizes and bases of objects are not in themselves sensitive * information, as to conserve precious locked memory. In some operating systems * the amount of memory that can be locked is small. diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 713f41029828a..5958f9c979e8f 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -441,7 +441,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/data/script_tests.json b/src/test/data/script_tests.json index 1dd062b98029e..846980c4739f6 100644 --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -664,7 +664,7 @@ ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "", "OK"], ["While not really correctly DER encoded, the empty signature is allowed by"], -["STRICTENC to provide a compact way to provide a delibrately invalid signature."], +["STRICTENC to provide a compact way to provide a deliberately invalid signature."], ["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", "STRICTENC", "OK"], ["0 0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", "STRICTENC", "OK"], diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index 7222c94d38237..1d722d9135ae5 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -108,7 +108,7 @@ [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 CHECKLOCKTIMEVERIFY 1"]], "0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000fe64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], -["By-time locks, with argument just beyond tx nLockTime (but within numerical boundries)"], +["By-time locks, with argument just beyond tx nLockTime (but within numerical boundaries)"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000001 CHECKLOCKTIMEVERIFY 1"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 CHECKLOCKTIMEVERIFY 1"]], diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json index 39a9054c08ae7..19c1bf0e362b2 100644 --- a/src/test/data/tx_valid.json +++ b/src/test/data/tx_valid.json @@ -188,7 +188,7 @@ [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 CHECKLOCKTIMEVERIFY 1"]], "0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000000ff64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], -["By-time locks, with argument just beyond tx nLockTime (but within numerical boundries)"], +["By-time locks, with argument just beyond tx nLockTime (but within numerical boundaries)"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 CHECKLOCKTIMEVERIFY 1"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 CHECKLOCKTIMEVERIFY 1"]], diff --git a/src/test/evo_deterministicmns_tests.cpp b/src/test/evo_deterministicmns_tests.cpp index ece71af13dd80..13083f936deb0 100644 --- a/src/test/evo_deterministicmns_tests.cpp +++ b/src/test/evo_deterministicmns_tests.cpp @@ -1257,7 +1257,7 @@ BOOST_FIXTURE_TEST_CASE(dkg_pose_and_qfc_invalid_paths, TestChain400Setup) ProcessQuorum(llmq::quorumBlockProcessor.get(), qfc, &dummyNode); BOOST_CHECK(qfc.CountSigners() > qfc2.CountSigners()); - // final commitment received, accepted, and replaced the previous one (with less memebers) + // final commitment received, accepted, and replaced the previous one (with less members) BOOST_CHECK(llmq::quorumBlockProcessor->HasMinableCommitment(::SerializeHash(qfc))); // activate spork 22 and try to mine a non-null commitment diff --git a/src/test/librust/sapling_wallet_tests.cpp b/src/test/librust/sapling_wallet_tests.cpp index aca0a5c81f54d..e2b28945df694 100644 --- a/src/test/librust/sapling_wallet_tests.cpp +++ b/src/test/librust/sapling_wallet_tests.cpp @@ -631,7 +631,7 @@ BOOST_AUTO_TEST_CASE(CachedWitnessesEmptyChain) BOOST_CHECK((bool) saplingWitnesses[0]); - // Until zcash#1302 is implemented, this should triggger an assertion + // Until zcash#1302 is implemented, this should trigger an assertion BOOST_CHECK_THROW(wallet.DecrementNoteWitnesses(&index), std::runtime_error); } diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp index 0743846b216a7..cee70543d1246 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 = InsecureRandRange(ntx); diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp index 544ef6a875d1b..5bf84ec63eee3 100644 --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -394,7 +394,7 @@ BOOST_AUTO_TEST_CASE(malleated_tx) } } - // add a random trasparent output + // add a random transparent output { mtx = _tx; CTxOut out; diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index d3c9856abe9db..41e4ec451e391 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -523,7 +523,7 @@ BOOST_AUTO_TEST_CASE(util_GetChainName) BOOST_CHECK_THROW(test_args.GetChainName(), std::runtime_error); // check setting the network to test (and thus making - // [test] regtest=1 potentially relevent) doesn't break things + // [test] regtest=1 potentially relevant) doesn't break things test_args.SelectConfigNetwork("test"); test_args.ParseParameters(0, (char**)argv_testnet); @@ -1081,7 +1081,7 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory) thr.join(); BOOST_CHECK_EQUAL(threadresult, true); #ifndef WIN32 - // Try to aquire lock in child process while we're holding it, this should fail. + // Try to acquire lock in child process while we're holding it, this should fail. char ch; BOOST_CHECK_EQUAL(write(fd[1], &LockCommand, 1), 1); BOOST_CHECK_EQUAL(read(fd[1], &ch, 1), 1); @@ -1092,7 +1092,7 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory) // Probing lock from our side now should succeed, but not hold on to the lock. BOOST_CHECK_EQUAL(LockDirectory(dirname, lockname, true), true); - // Try to acquire the lock in the child process, this should be succesful. + // Try to acquire the lock in the child process, this should be successful. BOOST_CHECK_EQUAL(write(fd[1], &LockCommand, 1), 1); BOOST_CHECK_EQUAL(read(fd[1], &ch, 1), 1); BOOST_CHECK_EQUAL((bool)ch, true); diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 6da7cbebb2993..dbda5c39fdf30 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -776,7 +776,7 @@ void CTxMemPool::removeProTxSpentCollateralConflicts(const CTransaction &tx) } auto dmn = mnList.GetMNByCollateral(in.prevout); if (dmn) { - // These are updates refering to a mined ProRegTx + // These are updates referring to a mined ProRegTx removeProTxReferences(dmn->proTxHash, MemPoolRemovalReason::CONFLICT); } } diff --git a/src/txmempool.h b/src/txmempool.h index a7c9a4ec93e39..acf8e873ae6e1 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -37,7 +37,7 @@ class CTxMemPool; /** \class CTxMemPoolEntry * - * CTxMemPoolEntry stores data about the correponding transaction, as well + * CTxMemPoolEntry stores data about the corresponding transaction, as well * as data about all in-mempool transactions that depend on the transaction * ("descendant" transactions). * @@ -721,7 +721,7 @@ class CTxMemPool }; -/** +/** * CCoinsView that brings transactions from a memorypool into view. * It does not check for spendings by memory pool transactions. */ diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h index 344e32935bc32..ecc2449a3d27a 100644 --- a/src/utilstrencodings.h +++ b/src/utilstrencodings.h @@ -141,7 +141,7 @@ T FindFirstNonZero(T itbegin, T itend) std::string HexStr(const Span s); inline std::string HexStr(const Span s) { return HexStr(MakeUCharSpan(s)); } -/** Reverse the endianess of a string */ +/** Reverse the endianness of a string */ inline std::string ReverseEndianString(std::string in) { std::string out = ""; diff --git a/src/validation.cpp b/src/validation.cpp index bc8e163cb5ece..c9cdc58ce3ae3 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1163,7 +1163,7 @@ static bool AbortNode(const std::string& strMessage, const std::string& userMess SetMiscWarning(strMessage); LogPrintf("*** %s\n", strMessage); uiInterface.ThreadSafeMessageBox( - userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage, + userMessage.empty() ? _("Error: A fatal internal error occurred, see debug.log for details") : userMessage, "", CClientUIInterface::MSG_ERROR); StartShutdown(); return false; @@ -2763,7 +2763,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo nHeight = pindexPrev->nHeight + 1; // PIVX - // It is entierly possible that we don't have enough data and this could fail + // It is entirely possible that we don't have enough data and this could fail // (i.e. the block could indeed be valid). Store the block for later consideration // but issue an initial reject message. // The case also exists that the sending peer could not have enough data to see diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 38774102e97c2..e23e70e04df41 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -76,7 +76,7 @@ BerkeleyEnvironment* GetWalletEnv(const fs::path& wallet_path, std::string& data database_filename = "wallet.dat"; } LOCK(cs_db); - // Note: An ununsed temporary BerkeleyEnvironment object may be created inside the + // Note: An unused temporary BerkeleyEnvironment object may be created inside the // emplace function if the key already exists. This is a little inefficient, // but not a big concern since the map will be changed in the future to hold // pointers instead of objects, anyway. diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index c53c35de4ef1d..37dfa5f86319f 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1156,7 +1156,7 @@ UniValue bip38encrypt(const JSONRPCRequest& request) std::string encryptedOut = BIP38_Encrypt(strAddress, strPassphrase, privKey, vchSecret.IsCompressed()); UniValue result(UniValue::VOBJ); - result.pushKV("Addess", strAddress); + result.pushKV("Address", strAddress); result.pushKV("Encrypted Key", encryptedOut); return result; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 5668cfd869b0b..85904299e88ca 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -403,7 +403,7 @@ UniValue upgradewallet(const JSONRPCRequest& request) "Bump the wallet features to the latest supported version. Non-HD wallets will be upgraded to HD wallet functionality. " "Marking all the previous keys as pre-split keys and managing them separately. Once the last key in the pre-split keypool gets marked as used (received balance), the wallet will automatically start using the HD generated keys.\n" "The upgraded HD wallet will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.\n" - "Wallets that are already runnning the latest HD version will be upgraded to Sapling support\n" + "Wallets that are already running the latest HD version will be upgraded to Sapling support\n" "Enabling the Sapling key manager. Sapling keys will be deterministically derived by the same HD wallet seed.\n" "Wallets that are running the latest Sapling version will not be upgraded" "\nNote that you will need to MAKE A NEW BACKUP of your wallet after upgrade it.\n" @@ -629,7 +629,7 @@ UniValue listshieldunspent(const JSONRPCRequest& request) " \"spendable\" : true|false, (boolean) true if note can be spent by wallet, false if address is watchonly\n" " \"address\" : \"address\", (string) the shield address\n" " \"amount\": xxxxx, (numeric) the amount of value in the note\n" - " \"memo\": xxxxx, (string) hexademical string representation of memo field\n" + " \"memo\": xxxxx, (string) hexadecimal string representation of memo field\n" " \"change\": true|false, (boolean) true if the address that received the note is also one of the sending addresses\n" " \"nullifier\": xxxxx, (string) the note's nullifier, hex encoded" " }\n" @@ -1507,7 +1507,7 @@ UniValue viewshieldtransaction(const JSONRPCRequest& request) " \"outgoing\" : true|false (boolean, sapling) True if the output is not for an address in the wallet\n" " \"value\" : x.xxx (numeric) The amount in " + CURRENCY_UNIT + "\n" " \"valueSat\" : xxxx (numeric) The amount in satoshis\n" - " \"memo\" : \"hexmemo\", (string) Hexademical string representation of the memo field\n" + " \"memo\" : \"hexmemo\", (string) Hexadecimal string representation of the memo field\n" " \"memoStr\" : \"memo\", (string) Only returned if memo contains valid UTF-8 text.\n" " }\n" " ,...\n" diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 2192451ec4594..110b7cb90398c 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -209,7 +209,7 @@ class WalletBatch static bool Recover(const fs::path& wallet_path, std::string& out_backup_filename); /* Recover filter (used as callback), will only let keys (cryptographical keys) as KV/key-type pass through */ static bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDataStream ssValue); - /* Function to determin if a certain KV/key-type is a key (cryptographical key) type */ + /* Function to determine if a certain KV/key-type is a key (cryptographical key) type */ static bool IsKeyType(const std::string& strType); /* verifies the database environment */ static bool VerifyEnvironment(const fs::path& wallet_path, std::string& errorStr); diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 87529534b9c13..5562b55b04dd3 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -37,7 +37,7 @@ class BaseNode(P2PInterface): def __init__(self): """Initialize the P2PInterface - Used to inialize custom properties for the Node that aren't + Used to initialize custom properties for the Node that aren't included by default in the base class. Be aware that the P2PInterface base class already stores a counter for each P2P message type and the last received message of each type, which should be sufficient for the @@ -77,7 +77,7 @@ class ExampleTest(PivxTestFramework): def set_test_params(self): """Override test parameters for your individual test. - This method must be overridden and num_nodes must be exlicitly set.""" + This method must be overridden and num_nodes must be explicitly set.""" self.setup_clean_chain = True self.num_nodes = 3 # Use self.extra_args to change command-line arguments for the nodes diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 67557ed302610..b53b56d09cb27 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -940,7 +940,7 @@ def run_test(self): assert_equal(get_legacy_sigopcount_block(b73), MAX_BLOCK_SIGOPS + 1) self.send_blocks([b73], False, 'bad-blk-sigops', reconnect=True) - # b74/75 - if we push an invalid script element, all prevous sigops are counted, + # b74/75 - if we push an invalid script element, all previous sigops are counted, # but sigops after the element are not counted. # # The invalid script element is that the push_data indicates that diff --git a/test/functional/mining_getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py index 658b79530a016..ba3273bfc7ae6 100755 --- a/test/functional/mining_getblocktemplate_longpoll.py +++ b/test/functional/mining_getblocktemplate_longpoll.py @@ -18,8 +18,8 @@ class LongpollThread(threading.Thread): def __init__(self, node): threading.Thread.__init__(self) # query current longpollid - templat = node.getblocktemplate() - self.longpollid = templat['longpollid'] + template = node.getblocktemplate() + self.longpollid = template['longpollid'] # create a new connection to the node, we can't use the same # connection from two threads self.node = get_rpc_proxy(node.url, 1, timeout=600, coveragedir=node.coverage_dir) @@ -34,8 +34,8 @@ def set_test_params(self): def run_test(self): self.log.info("Warning: this test will take about 70 seconds in the best case. Be patient.") self.nodes[0].generate(10) - templat = self.nodes[0].getblocktemplate() - longpollid = templat['longpollid'] + template = self.nodes[0].getblocktemplate() + longpollid = template['longpollid'] # longpollid should not change between successive invocations if nothing else happens templat2 = self.nodes[0].getblocktemplate() assert templat2['longpollid'] == longpollid diff --git a/test/functional/mining_pos_fakestake.py b/test/functional/mining_pos_fakestake.py index 008d927b5ec44..0bf0ca246cc08 100755 --- a/test/functional/mining_pos_fakestake.py +++ b/test/functional/mining_pos_fakestake.py @@ -7,7 +7,7 @@ (either in a previous block, in a "future" block, or in the same block being staked). Two nodes: nodes[0] moves the chain and checks the spam blocks, nodes[1] sends them. Spend txes sent from nodes[1] are received by nodes[0] -Start with the PoW chache: 200 blocks. +Start with the PoW cache: 200 blocks. For each test, nodes[1] sends 3 blocks. At the beginning nodes[0] mines 50 blocks (201-250) to reach PoS activation. diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py index 271bcf3d023d8..eb7e4d466f0d0 100755 --- a/test/functional/p2p_invalid_tx.py +++ b/test/functional/p2p_invalid_tx.py @@ -93,7 +93,7 @@ def run_test(self): self.log.info('Test orphan transaction handling ... ') SCRIPT_PUB_KEY_OP_TRUE = CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE]) - # Create a root transaction that we withhold until all dependend transactions + # Create a root transaction that we withhold until all dependent transactions # are sent out and in the orphan cache tx_withhold = self.new_spend_tx(block1.vtx[0].sha256, 0, [CTxOut(nValue=50 * COIN - 12000, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)]) diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 47eaaa2c7e67a..e423b6f0cdcd5 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -131,21 +131,21 @@ def run_test(self): def test_simple(self): self.log.info("simple test") dec_tx, fee, changepos = self.create_and_fund(2, [], {self.nodes[0].getnewaddress(): 1.0}) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_greater_than(changepos, -1) # check change assert_equal(Decimal(dec_tx['vout'][changepos]['value']) + fee, DecimalAmt(0.5)) def test_simple_two_coins(self): self.log.info("simple test with two coins") dec_tx, fee, changepos = self.create_and_fund(2, [], {self.nodes[0].getnewaddress(): 2.2}) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_greater_than(changepos, -1) # check change assert_equal(Decimal(dec_tx['vout'][changepos]['value']) + fee, DecimalAmt(0.3)) def test_simple_one_coin(self): self.log.info("simple test with one coin") dec_tx, fee, changepos = self.create_and_fund(2, [], {self.nodes[0].getnewaddress(): 2.6}) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_greater_than(changepos, -1) # check change assert_equal(Decimal(dec_tx['vout'][changepos]['value']) + fee, DecimalAmt(2.4)) @@ -153,7 +153,7 @@ def test_simple_two_outputs(self): self.log.info("simple test with two outputs") outputs = {self.nodes[0].getnewaddress(): 2.6, self.nodes[1].getnewaddress(): 2.5} dec_tx, fee, changepos = self.create_and_fund(2, [], outputs) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_greater_than(changepos, -1) # check change assert_equal(Decimal(dec_tx['vout'][changepos]['value']) + fee, DecimalAmt(0.9)) assert check_outputs(outputs, dec_tx) # check outputs @@ -164,7 +164,7 @@ def test_change(self): inputs = [{'txid': utx['txid'], 'vout': utx['vout']}] outputs = {self.nodes[0].getnewaddress(): 1.0} dec_tx, fee, changepos = self.create_and_fund(2, inputs, outputs) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_greater_than(changepos, -1) # check change assert_equal(Decimal(dec_tx['vout'][changepos]['value']) + fee, DecimalAmt(4.0)) assert check_outputs(outputs, dec_tx) # check outputs @@ -176,7 +176,7 @@ def test_no_change(self): inputs = [{'txid': utx['txid'], 'vout': utx['vout']}] outputs = {self.nodes[0].getnewaddress(): 5.0 - float(self.test_no_change_fee) - float(self.fee_tolerance)} dec_tx, fee, changepos = self.create_and_fund(2, inputs, outputs) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_equal(changepos, -1) # check (no) change assert check_outputs(outputs, dec_tx) # check outputs @@ -235,7 +235,7 @@ def test_coin_selection(self): fee = rawtxfund['fee'] changepos = rawtxfund['changepos'] dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex']) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert_equal("00", dec_tx['vin'][0]['scriptSig']['hex']) # check vin sig again assert_equal(len(dec_tx['vout']), 2) assert_greater_than(changepos, -1) # check change @@ -249,7 +249,7 @@ def test_two_vin(self): inputs = [{'txid': utx['txid'], 'vout': utx['vout']}, {'txid': utx2['txid'], 'vout': utx2['vout']}] outputs = {self.nodes[0].getnewaddress(): 6.0} dec_tx, fee, changepos = self.create_and_fund(2, inputs, outputs) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert check_outputs(outputs, dec_tx) # check outputs assert_equal(len(dec_tx['vout']), 2) matchingIns = len([x for x in dec_tx['vin'] if x['txid'] in [y['txid'] for y in inputs]]) @@ -264,7 +264,7 @@ def test_two_vin_two_vout(self): inputs = [{'txid': utx['txid'], 'vout': utx['vout']}, {'txid': utx2['txid'], 'vout': utx2['vout']}] outputs = {self.nodes[0].getnewaddress(): 6.0, self.nodes[0].getnewaddress(): 1.0} dec_tx, fee, changepos = self.create_and_fund(2, inputs, outputs) - assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enought inputs + assert_equal(len(dec_tx['vin']) > 0, True) # test if we have enough inputs assert check_outputs(outputs, dec_tx) # check outputs assert_equal(len(dec_tx['vout']), 3) matchingIns = len([x for x in dec_tx['vin'] if x['txid'] in [y['txid'] for y in inputs]]) diff --git a/test/functional/sapling_wallet_persistence.py b/test/functional/sapling_wallet_persistence.py index 972c42fe4fdff..ec324e132d14f 100755 --- a/test/functional/sapling_wallet_persistence.py +++ b/test/functional/sapling_wallet_persistence.py @@ -16,7 +16,7 @@ def set_test_params(self): def run_test(self): sapling_addr = self.nodes[0].getnewshieldaddress() addresses = self.nodes[0].listshieldaddresses() - # make sure the node has the addresss + # make sure the node has the addresses assert_true(sapling_addr in addresses, "Should contain address before restart") # restart the nodes self.stop_node(0) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 6f81d7ada494e..fb727d925243e 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -4,7 +4,7 @@ # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -"""Bitcoin test framework primitive and message strcutures +"""Bitcoin test framework primitive and message structures CBlock, CTransaction, CBlockHeader, CTxIn, CTxOut, etc....: data structures that should map to corresponding structures in diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 99067f6988c82..c8d6452028c05 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -704,7 +704,7 @@ def stake_block(self, If empty string, it will be used the pk from the stake input (dumping the sk from rpc_conn). If None, then the DUMMY_KEY will be used. vtx: ([CTransaction] list) transactions to add to block.vtx - fDoubleSpend: (bool) wether any tx in vtx is allowed to spend the coinstake input + fDoubleSpend: (bool) whether any tx in vtx is allowed to spend the coinstake input :return: block: (CBlock) block produced, must be manually relayed """ assert_greater_than(len(self.nodes), node_id) diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index ebccb5adc1ae8..df9dadb613d61 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -156,7 +156,7 @@ def wait_for_rpc_connection(self): # The wait is done here to make tests as robust as possible # and prevent racy tests and intermittent failures as much # as possible. Some tests might not need this, but the - # overhead is trivial, and the added gurantees are worth + # overhead is trivial, and the added guarantees are worth # the minimal performance cost. # If the call to getblockcount() succeeds then the RPC connection is up self.log.debug("RPC successfully started") diff --git a/test/functional/tiertwo_deterministicmns.py b/test/functional/tiertwo_deterministicmns.py index 3621507acc931..8e55980922490 100755 --- a/test/functional/tiertwo_deterministicmns.py +++ b/test/functional/tiertwo_deterministicmns.py @@ -362,7 +362,7 @@ def run_test(self): miner.protx_update_registrar(mns[0].proTx, mns[0].operator_pk, "", "", ownerKey) miner.generate(1) self.sync_blocks() - self.check_mn_enabled_count(5, 6) # stil not valid until new operator sends proUpServ + self.check_mn_enabled_count(5, 6) # still not valid until new operator sends proUpServ self.check_mn_list(mns) self.log.info("Update voting address...") mns[1].voting = controller.getnewaddress() diff --git a/test/functional/tiertwo_reorg_mempool.py b/test/functional/tiertwo_reorg_mempool.py index 2474d0562d6d3..12bfddcc09e1c 100755 --- a/test/functional/tiertwo_reorg_mempool.py +++ b/test/functional/tiertwo_reorg_mempool.py @@ -322,7 +322,7 @@ def run_test(self): assert proupreg1_txid not in mempoolA assert proupreg2_txid not in mempoolA assert proupreg3_txid in mempoolA - # The frist mempool proUpRev tx has been removed as it was meant to revoke + # The first mempool proUpRev tx has been removed as it was meant to revoke # a masternode that is not in the deterministic list anymore. assert prouprev1_txid not in mempoolA assert prouprev2_txid in mempoolA diff --git a/test/functional/tiertwo_signing_session.py b/test/functional/tiertwo_signing_session.py index 447404c4f792f..d166d06d11af5 100755 --- a/test/functional/tiertwo_signing_session.py +++ b/test/functional/tiertwo_signing_session.py @@ -44,14 +44,14 @@ def run_test(self): msgHash = "0000000000000000000000000000000000000000000000000000000000000002" msgHashConflict = "0000000000000000000000000000000000000000000000000000000000000003" self.log.info("starting signing") - # Only valid quorum memebrs can sign the message + # Only valid quorum members can sign the message for i in range(len(self.nodes)): if (i in [m.idx for m in members]): assert_equal(True, self.nodes[i].signsession(100, id, msgHash)) else: assert_equal(False, self.nodes[i].signsession(100, id, msgHash)) self.log.info("finished signing") - # At this point a recovery trheshold signaure should have been generated and propagated to the whole network + # At this point a recovery threshold signature should have been generated and propagated to the whole network # Let's generate some blocks to ensure that nodes are synced time.sleep(5) for i in range(len(self.nodes)): @@ -61,7 +61,7 @@ def run_test(self): for i in range(len(self.nodes)): assert_equal(False, self.nodes[i].hasrecoverysignature(100, id, msgHashConflict)) - self.log.info("Threshold signature succesfully generated and propagated!") + self.log.info("Threshold signature successfully generated and propagated!") # Second scenario, let's select a new signing session (i.e. a new id) and this time nodes will not agree on the msgHash self.log.info("----------------------------------") @@ -84,12 +84,12 @@ def run_test(self): else: assert_equal(False, self.nodes[i].signsession(100, id, msgHash)) - # Since with this quorum type 2 nodes are enough to generate the treshold signature at the end every node MUST agree on (id, msgHash) + # Since with this quorum type 2 nodes are enough to generate the threshold signature at the end every node MUST agree on (id, msgHash) # Let's wait a bit to sync all messages time.sleep(5) for i in range(len(self.nodes)): assert_equal(True, self.nodes[i].hasrecoverysignature(100, id, msgHash)) - self.log.info("Threshold signature succesfully generated and propagated!") + self.log.info("Threshold signature successfully generated and propagated!") # Finally let's test that those signatures are valid in the future: # it must be valid if we generate enough quorums to push the first one out of the active set diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 7262eeb0c20e3..a9dc3f790acc5 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -246,7 +246,7 @@ def run_test(self): assert_equal(self.nodes[0].getmempoolinfo()['size'], chainlimit*2) assert_equal(len(txid_list), chainlimit*2) - # Excercise query_options parameter in listunspent + # Exercise query_options parameter in listunspent # Node 1 has: # - 1 coin of 1.00 PIV # - 7 coins of 250.00 PIV diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py index 080799a0367a4..02f854d1db052 100755 --- a/test/functional/wallet_keypool_topup.py +++ b/test/functional/wallet_keypool_topup.py @@ -67,7 +67,7 @@ def run_test(self): connect_nodes(self.nodes[0], 1) self.sync_all() - # wallet was not backupped after emptying the key pool. + # wallet was not backed-up after emptying the key pool. # Legacy wallet can't recover funds in addr_extpool recoveredBalance = 10 if isLegacyWallet else 15 assert_equal(self.nodes[1].getbalance(), recoveredBalance) diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/lint-spelling.ignore-words.txt new file mode 100644 index 0000000000000..6cbe48ba6e72a --- /dev/null +++ b/test/lint/lint-spelling.ignore-words.txt @@ -0,0 +1,23 @@ +blockin +bu +buda +clen +crate +crypted +fo +halfs +hights +homogenous +inout +nd +nin +onl +ot +projet +seperator +ser +siz +te +unser +wit +xwindows diff --git a/test/lint/lint-spelling.sh b/test/lint/lint-spelling.sh new file mode 100755 index 0000000000000..00331a6b868e6 --- /dev/null +++ b/test/lint/lint-spelling.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2018-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# +# Warn in case of spelling errors. +# Note: Will exit successfully regardless of spelling errors. + +export LC_ALL=C + +if ! command -v codespell > /dev/null; then + echo "Skipping spell check linting since codespell is not installed." + exit 0 +fi + +IGNORE_WORDS_FILE=test/lint/lint-spelling.ignore-words.txt +mapfile -t FILES < <(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/chiabls/" ":(exclude)src/crc32c/" ":(exclude)src/crypto/" ":(exclude)src/immer/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)contrib/gitian-keys/keys.txt" ":(exclude)src/libzerocoin/documentation/" ":(exclude)src/qt/pivxstrings.cpp") +if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} "${FILES[@]}"; then + echo "^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in ${IGNORE_WORDS_FILE}" +fi