diff --git a/ci/README.md b/ci/README.md index 19228ffbaaf0b..aa89a179f74b2 100644 --- a/ci/README.md +++ b/ci/README.md @@ -61,5 +61,5 @@ in order. ### Cache In order to avoid rebuilding all dependencies for each build, the binaries are -cached and re-used when possible. Changes in the dependency-generator will +cached and reused when possible. Changes in the dependency-generator will trigger cache-invalidation and rebuilds as necessary. diff --git a/depends/description.md b/depends/description.md index cb69b81ae3500..83b5bef859bbe 100644 --- a/depends/description.md +++ b/depends/description.md @@ -27,7 +27,7 @@ etc), and as well as a hash of the same data for each recursive dependency. If any portion of a package's build recipe changes, it will be rebuilt as well as any other package that depends on it. If any of the main makefiles (Makefile, funcs.mk, etc) are changed, all packages will be rebuilt. After building, the -results are cached into a tarball that can be re-used and distributed. +results are cached into a tarball that can be reused and distributed. ### Package build results are (relatively) deterministic. diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 3840ed5e5748a..518d8c54e5ca5 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2917,7 +2917,7 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic // of transactions relevant to them, without having to download the // entire memory pool. // Also, other nodes can use these messages to automatically request a - // transaction from some other peer that annnounced it, and stop + // transaction from some other peer that announced it, and stop // waiting for us to respond. // In normal operation, we often send NOTFOUND messages for parents of // transactions that we relay; if a peer is missing a parent, they may @@ -3789,7 +3789,7 @@ void PeerManagerImpl::ProcessMessage( return; } - // Log succesful connections unconditionally for outbound, but not for inbound as those + // Log successful connections unconditionally for outbound, but not for inbound as those // can be triggered by an attacker at high rate. if (!pfrom.IsInboundConn() || LogAcceptCategory(BCLog::NET, BCLog::Level::Debug)) { LogPrintf("New %s %s peer connected: version: %d, blocks=%d, peer=%d%s\n", diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index f08d87208192c..425362681685a 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -237,7 +237,7 @@ class TransactionTablePriv // If a status update is needed (blocks came in since last check), // try to update the status of this transaction from the wallet. - // Otherwise, simply re-use the cached status. + // Otherwise, simply reuse the cached status. interfaces::WalletTxStatus wtx; int numBlocks; int64_t block_time; diff --git a/src/rpc/request.cpp b/src/rpc/request.cpp index f1cd256e3549a..c00c0b552fc38 100644 --- a/src/rpc/request.cpp +++ b/src/rpc/request.cpp @@ -78,6 +78,8 @@ static fs::path GetAuthCookieFile(bool temp=false) return AbsPathForConfigVal(arg); } +static bool g_generated_cookie = false; + bool GenerateAuthCookie(std::string *cookie_out) { const size_t COOKIE_SIZE = 32; @@ -103,6 +105,7 @@ bool GenerateAuthCookie(std::string *cookie_out) LogPrintf("Unable to rename cookie authentication file %s to %s\n", fs::PathToString(filepath_tmp), fs::PathToString(filepath)); return false; } + g_generated_cookie = true; LogPrintf("Generated RPC authentication cookie %s\n", fs::PathToString(filepath)); if (cookie_out) @@ -129,7 +132,10 @@ bool GetAuthCookie(std::string *cookie_out) void DeleteAuthCookie() { try { - fs::remove(GetAuthCookieFile()); + if (g_generated_cookie) { + // Delete the cookie file if it was generated by this process + fs::remove(GetAuthCookieFile()); + } } catch (const fs::filesystem_error& e) { LogPrintf("%s: Unable to remove random auth cookie file: %s\n", __func__, fsbridge::get_filesystem_error_message(e)); } diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index cbb8d0f93e467..bbcb8223a86fd 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -427,7 +427,7 @@ static inline JSONRPCRequest transformNamedArguments(const JSONRPCRequest& in, c } // Process expected parameters. If any parameters were left unspecified in // the request before a parameter that was specified, null values need to be - // inserted at the unspecifed parameter positions, and the "hole" variable + // inserted at the unspecified parameter positions, and the "hole" variable // below tracks the number of null values that need to be inserted. // The "initial_hole_size" variable stores the size of the initial hole, // i.e. how many initial positional arguments were left unspecified. This is diff --git a/src/test/fuzz/FuzzedDataProvider.h b/src/test/fuzz/FuzzedDataProvider.h index 8a8214bd99fef..5903ed837917c 100644 --- a/src/test/fuzz/FuzzedDataProvider.h +++ b/src/test/fuzz/FuzzedDataProvider.h @@ -158,7 +158,7 @@ FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) { // picking its contents. std::string result; - // Reserve the anticipated capaticity to prevent several reallocations. + // Reserve the anticipated capacity to prevent several reallocations. result.reserve(std::min(max_length, remaining_bytes_)); for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) { char next = ConvertUnsignedToSigned(data_ptr_[0]); diff --git a/src/test/orphanage_tests.cpp b/src/test/orphanage_tests.cpp index 5eb3f7379551c..ed7aa50da3b72 100644 --- a/src/test/orphanage_tests.cpp +++ b/src/test/orphanage_tests.cpp @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans) tx.vin[j].prevout.hash = txPrev->GetHash(); } BOOST_CHECK(SignSignature(keystore, *txPrev, tx, 0, SIGHASH_ALL)); - // Re-use same signature for other inputs + // Reuse same signature for other inputs // (they don't have to be valid for this test) for (unsigned int j = 1; j < tx.vin.size(); j++) tx.vin[j].scriptSig = tx.vin[0].scriptSig; diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 9407dc80d5de8..446538eb94ff5 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -1049,7 +1049,7 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23) BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err)); keys.clear(); - keys.push_back(key2); keys.push_back(key2); // Can't re-use sig + keys.push_back(key2); keys.push_back(key2); // Can't reuse sig CScript badsig1 = sign_multisig(scriptPubKey23, keys, CTransaction(txTo23)); BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, gFlags, MutableTransactionSignatureChecker(&txTo23, 0, txFrom23.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err)); BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err)); diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp index b6d6b32717754..2f7babae6aca7 100644 --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(versionbits_computeblockversion) uint32_t chain_all_vbits{0}; for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i) { const auto dep = static_cast(i); - // Check that no bits are re-used (within the same chain). This is + // Check that no bits are reused (within the same chain). This is // disallowed because the transition to FAILED (on timeout) does // not take precedence over STARTED/LOCKED_IN. So all softforks on // the same bit might overlap, even when non-overlapping start-end diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index 5b9e73194fde2..be0301e873da9 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -249,7 +249,7 @@ std::map ParseTorReplyMapping(const std::string &s) /** * Unescape value. Per https://spec.torproject.org/control-spec section 2.1.1: * - * For future-proofing, controller implementors MAY use the following + * For future-proofing, controller implementers MAY use the following * rules to be compatible with buggy Tor implementations and with * future ones that implement the spec as intended: * diff --git a/src/txmempool.h b/src/txmempool.h index 25eedd282b9a1..c2251a58203e4 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -622,7 +622,7 @@ class CTxMemPool void removeRecursive(const CTransaction& tx, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs); /** After reorg, filter the entries that would no longer be valid in the next block, and update * the entries' cached LockPoints if needed. The mempool does not have any knowledge of - * consensus rules. It just appplies the callable function and removes the ones for which it + * consensus rules. It just applies the callable function and removes the ones for which it * returns true. * @param[in] filter_final_and_mature Predicate that checks the relevant validation rules * and updates an entry's LockPoints. diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index 4aa657beb8d3c..3f78b2ab88194 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -122,8 +122,6 @@ void WalletInit::AddWalletOptions(ArgsManager& argsman) const argsman.AddArg("-walletrejectlongchains", strprintf("Wallet will not create transactions that violate mempool chain limits (default: %u)", DEFAULT_WALLET_REJECT_LONG_CHAINS), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::WALLET_DEBUG_TEST); argsman.AddArg("-walletcrosschain", strprintf("Allow reusing wallet files across chains (default: %u)", DEFAULT_WALLETCROSSCHAIN), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::WALLET_DEBUG_TEST); - - argsman.AddHiddenArgs({"-zapwallettxes"}); } bool WalletInit::ParameterInteraction() const @@ -147,10 +145,6 @@ bool WalletInit::ParameterInteraction() const LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__); } - if (gArgs.IsArgSet("-zapwallettxes")) { - return InitError(Untranslated("-zapwallettxes has been removed. If you are attempting to remove a stuck transaction from your wallet, please use abandontransaction instead.")); - } - int rescan_mode = gArgs.GetIntArg("-rescan", 0); if (rescan_mode < 0 || rescan_mode > 2) { LogPrintf("%s: Warning: incorrect -rescan mode, falling back to default value.\n", __func__); diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 22f2168d30d6a..25e00ce969bb6 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -1068,7 +1068,7 @@ static util::Result CreateTransactionInternal( } // Before we return success, we assume any change key will be used to prevent - // accidental re-use. + // accidental reuse. reservedest.KeepDestination(); wallet.WalletLogPrintf("Fee Calculation: Fee:%d Bytes:%u Tgt:%d (requested %d) Reason:\"%s\" Decay %.5f: Estimation: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out) Fail: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out)\n", @@ -1111,7 +1111,7 @@ util::Result CreateTransaction( CCoinControl tmp_cc = coin_control; tmp_cc.m_avoid_partial_spends = true; - // Re-use the change destination from the first creation attempt to avoid skipping BIP44 indexes + // Reuse the change destination from the first creation attempt to avoid skipping BIP44 indexes const int ungrouped_change_pos = txr_ungrouped.change_pos; if (ungrouped_change_pos != -1) { ExtractDestination(txr_ungrouped.tx->vout[ungrouped_change_pos].scriptPubKey, tmp_cc.destChange); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2de6a6899a43b..ef19b79c4f798 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -167,7 +167,7 @@ extern const std::map WALLET_FLAG_CAVEATS; * Instantiating a ReserveDestination does not reserve an address. To do so, * GetReservedDestination() needs to be called on the object. Once an address has been * reserved, call KeepDestination() on the ReserveDestination object to make sure it is not - * returned. Call ReturnDestination() to return the address so it can be re-used (for + * returned. Call ReturnDestination() to return the address so it can be reused (for * example, if the address was used in a new transaction * and that transaction was not completed and needed to be aborted). * diff --git a/test/functional/feature_filelock.py b/test/functional/feature_filelock.py index 54c5956274f06..404766fba5ba9 100755 --- a/test/functional/feature_filelock.py +++ b/test/functional/feature_filelock.py @@ -28,6 +28,9 @@ def run_test(self): expected_msg = f"Error: Cannot obtain a lock on data directory {datadir}. {self.config['environment']['PACKAGE_NAME']} is probably already running." self.nodes[1].assert_start_raises_init_error(extra_args=[f'-datadir={self.nodes[0].datadir}', '-noserver'], expected_msg=expected_msg) + cookie_file = datadir / ".cookie" + assert cookie_file.exists() # should not be deleted during the second bitcoind instance shutdown + if self.is_wallet_compiled(): def check_wallet_filelock(descriptors): wallet_name = ''.join([random.choice(string.ascii_lowercase) for _ in range(6)]) diff --git a/test/functional/test_framework/blockfilter.py b/test/functional/test_framework/blockfilter.py index 3d6b38a23d0ca..a16aa3d34f3e4 100644 --- a/test/functional/test_framework/blockfilter.py +++ b/test/functional/test_framework/blockfilter.py @@ -29,7 +29,7 @@ def bip158_basic_element_hash(script_pub_key, N, block_hash): def bip158_relevant_scriptpubkeys(node, block_hash): - """ Determines the basic filter relvant scriptPubKeys as defined in BIP158: + """ Determines the basic filter relevant scriptPubKeys as defined in BIP158: 'A basic filter MUST contain exactly the following items for each transaction in a block: - The previous output script (the script being spent) for each input, except for diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py index 7955dd4f3e65c..dd7cb0306eb08 100755 --- a/test/lint/check-doc.py +++ b/test/lint/check-doc.py @@ -23,7 +23,7 @@ CMD_GREP_WALLET_HIDDEN_ARGS = r"git grep --function-context 'void DummyWalletInit::AddWalletOptions' -- {}".format(CMD_ROOT_DIR) CMD_GREP_DOCS = r"git grep --perl-regexp '{}' {}".format(REGEX_DOC, CMD_ROOT_DIR) # list unsupported, deprecated and duplicate args as they need no documentation -SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb', '-zapwallettxes']) +SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb']) def lint_missing_argument_documentation(): diff --git a/test/lint/spelling.ignore-words.txt b/test/lint/spelling.ignore-words.txt index 036c53ef44e4b..49225e638f1bc 100644 --- a/test/lint/spelling.ignore-words.txt +++ b/test/lint/spelling.ignore-words.txt @@ -4,6 +4,7 @@ blockin cachable creat crypted +debbugs fo fpr hights