lint: Fix typos flagged by codespell (#4639)

This commit is contained in:
Munkybooty 2021-12-28 16:45:54 -05:00 committed by GitHub
parent 61036f4fdb
commit 926d4a774f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 26 additions and 20 deletions

View File

@ -853,7 +853,7 @@ if test x$use_hardening != xno; then
fi fi
dnl These flags are specific to ld64, and may cause issues with other linkers. dnl These flags are specific to ld64, and may cause issues with other linkers.
dnl For example: GNU ld will intepret -dead_strip as -de and then try and use dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
dnl "ad_strip" as the symbol for the entry point. dnl "ad_strip" as the symbol for the entry point.
if test x$TARGET_OS = xdarwin; then if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])

View File

@ -57,8 +57,8 @@ def run():
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name)) out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir): def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
"""Add all files in dir_to_add to tarfp, but prepent MEMBERPREFIX to the files' """Add all files in dir_to_add to tarfp, but prepent MEMBERPREFIX to the file's
names name
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking: e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:

View File

@ -646,7 +646,7 @@ Strings and formatting
- Do not use it to convert to `QString`. Use `QString::fromStdString()`. - Do not use it to convert to `QString`. Use `QString::fromStdString()`.
- *Rationale*: Qt has build-in functionality for converting their string - *Rationale*: Qt has built-in functionality for converting their string
type from/to C++. No need to roll your own. type from/to C++. No need to roll your own.
- In cases where do you call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because - In cases where do you call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because

View File

@ -1132,7 +1132,7 @@ void CInstantSendManager::TransactionAddedToMempool(const CTransactionRef& tx)
auto it = pendingNoTxInstantSendLocks.begin(); auto it = pendingNoTxInstantSendLocks.begin();
while (it != pendingNoTxInstantSendLocks.end()) { while (it != pendingNoTxInstantSendLocks.end()) {
if (it->second.second->txid == tx->GetHash()) { if (it->second.second->txid == tx->GetHash()) {
// we received an islock ealier // we received an islock earlier
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s\n", __func__, LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s\n", __func__,
tx->GetHash().ToString(), it->first.ToString()); tx->GetHash().ToString(), it->first.ToString());
islock = it->second.second; islock = it->second.second;
@ -1227,7 +1227,7 @@ void CInstantSendManager::AddNonLockedTx(const CTransactionRef& tx, const CBlock
auto it = pendingNoTxInstantSendLocks.begin(); auto it = pendingNoTxInstantSendLocks.begin();
while (it != pendingNoTxInstantSendLocks.end()) { while (it != pendingNoTxInstantSendLocks.end()) {
if (it->second.second->txid == tx->GetHash()) { if (it->second.second->txid == tx->GetHash()) {
// we received an islock ealier, let's put it back into pending and verify/lock // we received an islock earlier, let's put it back into pending and verify/lock
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s\n", __func__, LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s\n", __func__,
tx->GetHash().ToString(), it->first.ToString()); tx->GetHash().ToString(), it->first.ToString());
pendingInstantSendLocks.try_emplace(it->first, it->second); pendingInstantSendLocks.try_emplace(it->first, it->second);

View File

@ -160,7 +160,7 @@ public:
* Called when a ChainLock invalidated a IS Lock, removes any chained/children IS Locks and the invalidated IS Lock * Called when a ChainLock invalidated a IS Lock, removes any chained/children IS Locks and the invalidated IS Lock
* @param islockHash IS Lock hash which has been invalidated * @param islockHash IS Lock hash which has been invalidated
* @param txid Transaction id associated with the islockHash * @param txid Transaction id associated with the islockHash
* @param nHeight height of the block which recieved a chainlock and invalidated the IS Lock * @param nHeight height of the block which received a chainlock and invalidated the IS Lock
* @return A vector of IS Lock hashes of all IS Locks removed * @return A vector of IS Lock hashes of all IS Locks removed
*/ */
std::vector<uint256> RemoveChainedInstantSendLocks(const uint256& islockHash, const uint256& txid, int nHeight); std::vector<uint256> RemoveChainedInstantSendLocks(const uint256& islockHash, const uint256& txid, int nHeight);
@ -196,7 +196,7 @@ private:
// Incoming and not verified yet // Incoming and not verified yet
std::unordered_map<uint256, std::pair<NodeId, CInstantSendLockPtr>, StaticSaltedHasher> pendingInstantSendLocks GUARDED_BY(cs); std::unordered_map<uint256, std::pair<NodeId, CInstantSendLockPtr>, StaticSaltedHasher> pendingInstantSendLocks GUARDED_BY(cs);
// Tried to veryfy but there is no tx yet // Tried to verify but there is no tx yet
std::unordered_map<uint256, std::pair<NodeId, CInstantSendLockPtr>, StaticSaltedHasher> pendingNoTxInstantSendLocks GUARDED_BY(cs); std::unordered_map<uint256, std::pair<NodeId, CInstantSendLockPtr>, StaticSaltedHasher> pendingNoTxInstantSendLocks GUARDED_BY(cs);
// TXs which are neither IS locked nor ChainLocked. We use this to determine for which TXs we need to retry IS locking // TXs which are neither IS locked nor ChainLocked. We use this to determine for which TXs we need to retry IS locking

View File

@ -484,7 +484,7 @@ class CSubNet
READWRITE(obj.network); READWRITE(obj.network);
if (obj.network.IsIPv4()) { if (obj.network.IsIPv4()) {
// Before commit 102867c587f5f7954232fb8ed8e85cda78bb4d32, CSubNet used the last 4 bytes of netmask // Before commit 102867c587f5f7954232fb8ed8e85cda78bb4d32, CSubNet used the last 4 bytes of netmask
// to store the relevant bytes for an IPv4 mask. For compatiblity reasons, keep doing so in // to store the relevant bytes for an IPv4 mask. For compatibility reasons, keep doing so in
// serialized form. // serialized form.
unsigned char dummy[12] = {0}; unsigned char dummy[12] = {0};
READWRITE(dummy); READWRITE(dummy);

View File

@ -611,7 +611,7 @@ static void LogConnectFailure(bool manual_connection, const char* fmt, const Arg
* @param nTimeout Wait this many milliseconds for the connection to be * @param nTimeout Wait this many milliseconds for the connection to be
* established. * established.
* @param manual_connection Whether or not the connection was manually requested * @param manual_connection Whether or not the connection was manually requested
* (e.g. thru the addnode RPC) * (e.g. through the addnode RPC)
* *
* @returns Whether or not a connection was successfully made. * @returns Whether or not a connection was successfully made.
*/ */
@ -715,7 +715,7 @@ bool GetProxy(enum Network net, proxyType &proxyInfoOut) {
/** /**
* Set the name proxy to use for all connections to nodes specified by a * Set the name proxy to use for all connections to nodes specified by a
* hostname. After setting this proxy, connecting to a node sepcified by a * hostname. After setting this proxy, connecting to a node specified by a
* hostname won't result in a local lookup of said hostname, rather, connect to * hostname won't result in a local lookup of said hostname, rather, connect to
* the node by asking the name proxy for a proxy connection to the hostname, * the node by asking the name proxy for a proxy connection to the hostname,
* effectively delegating the hostname lookup to the specified proxy. * effectively delegating the hostname lookup to the specified proxy.

View File

@ -28,7 +28,7 @@ TransactionError BroadcastTransaction(const CTransactionRef tx, std::string& err
CCoinsViewCache &view = ::ChainstateActive().CoinsTip(); CCoinsViewCache &view = ::ChainstateActive().CoinsTip();
for (size_t o = 0; o < tx->vout.size(); o++) { for (size_t o = 0; o < tx->vout.size(); o++) {
const Coin& existingCoin = view.AccessCoin(COutPoint(hashTx, o)); const Coin& existingCoin = view.AccessCoin(COutPoint(hashTx, o));
// IsSpent doesnt mean the coin is spent, it means the output doesnt' exist. // IsSpent does not mean the coin is spent, it means the output does not exist.
// So if the output does exist, then this transaction exists in the chain. // So if the output does exist, then this transaction exists in the chain.
if (!existingCoin.IsSpent()) return TransactionError::ALREADY_IN_CHAIN; if (!existingCoin.IsSpent()) return TransactionError::ALREADY_IN_CHAIN;
} }

View File

@ -328,7 +328,7 @@ void BitcoinApplication::requestShutdown()
// rescanning a wallet. // rescanning a wallet.
m_node.startShutdown(); m_node.startShutdown();
// Unsetting the client model can cause the current thread to wait for node // Unsetting the client model can cause the current thread to wait for node
// to complete an operation, like wait for a RPC execution to complate. // to complete an operation, like wait for a RPC execution to complete.
window->setClientModel(nullptr); window->setClientModel(nullptr);
pollShutdownTimer->stop(); pollShutdownTimer->stop();

View File

@ -46,7 +46,7 @@
/** High fee for sendrawtransaction and testmempoolaccept. /** High fee for sendrawtransaction and testmempoolaccept.
* By default, transaction with a fee higher than this will be rejected by the * By default, transaction with a fee higher than this will be rejected by the
* RPCs. This can be overriden with the maxfeerate argument. * RPCs. This can be overridden with the maxfeerate argument.
*/ */
constexpr static CAmount DEFAULT_MAX_RAW_TX_FEE{COIN / 10}; constexpr static CAmount DEFAULT_MAX_RAW_TX_FEE{COIN / 10};

View File

@ -3265,7 +3265,7 @@ bool CChainState::InvalidateBlock(CValidationState& state, const CChainParams& c
bool ret = DisconnectTip(state, chainparams, &disconnectpool); bool ret = DisconnectTip(state, chainparams, &disconnectpool);
// DisconnectTip will add transactions to disconnectpool. // DisconnectTip will add transactions to disconnectpool.
// Adjust the mempool to be consistent with the new tip, adding // Adjust the mempool to be consistent with the new tip, adding
// transactions back to the mempool if disconnecting was succesful, // transactions back to the mempool if disconnecting was successful,
// and we're not doing a very deep invalidation (in which case // and we're not doing a very deep invalidation (in which case
// keeping the mempool up to date is probably futile anyway). // keeping the mempool up to date is probably futile anyway).
UpdateMempoolForReorg(disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret); UpdateMempoolForReorg(disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret);

View File

@ -884,7 +884,7 @@ static UniValue sendmany(const JSONRPCRequest& request)
{"comment", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "A comment"}, {"comment", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "A comment"},
{"subtractfeefrom", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "A json array with addresses.\n" {"subtractfeefrom", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n" " The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less dashs than you enter in their corresponding amount field.\n" " Those recipients will receive less dash than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.", " If no addresses are specified here, the sender pays the fee.",
{ {
{"address", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Subtract fee from this address"}, {"address", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Subtract fee from this address"},
@ -1967,7 +1967,7 @@ static UniValue walletpassphrase(const JSONRPCRequest& request)
throw std::runtime_error( throw std::runtime_error(
RPCHelpMan{"walletpassphrase", RPCHelpMan{"walletpassphrase",
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n" "\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
"This is needed prior to performing transactions related to private keys such as sending dashs\n" "This is needed prior to performing transactions related to private keys such as sending dash\n"
"\nNote:\n" "\nNote:\n"
"Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock\n" "Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock\n"
"time that overrides the old one.\n", "time that overrides the old one.\n",
@ -2232,7 +2232,7 @@ static UniValue lockunspent(const JSONRPCRequest& request)
"\nUpdates list of temporarily unspendable outputs.\n" "\nUpdates list of temporarily unspendable outputs.\n"
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n" "Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
"If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.\n" "If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending dashs.\n" "A locked transaction output will not be chosen by automatic coin selection, when spending dash.\n"
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n" "Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
"is always cleared (by virtue of process exit) when a node stops or fails.\n" "is always cleared (by virtue of process exit) when a node stops or fails.\n"
"Also see the listunspent call\n", "Also see the listunspent call\n",

View File

@ -77,7 +77,7 @@ class PSBTTest(BitcoinTestFramework):
assert_greater_than(0.07, res["fee"]) assert_greater_than(0.07, res["fee"])
# feeRate of 10 DASH / KB produces a total fee well above -maxtxfee # feeRate of 10 DASH / KB produces a total fee well above -maxtxfee
# previously this was silenty capped at -maxtxfee # previously this was silently capped at -maxtxfee
assert_raises_rpc_error(-4, "Fee exceeds maximum configured by -maxtxfee", self.nodes[1].walletcreatefundedpsbt, [{"txid":txid,"vout":p2pkh_pos},{"txid":txid,"vout":p2sh_pos},{"txid":txid,"vout":p2pkh_pos}], {self.nodes[1].getnewaddress():29.99}, 0, {"feeRate": 10}) assert_raises_rpc_error(-4, "Fee exceeds maximum configured by -maxtxfee", self.nodes[1].walletcreatefundedpsbt, [{"txid":txid,"vout":p2pkh_pos},{"txid":txid,"vout":p2sh_pos},{"txid":txid,"vout":p2pkh_pos}], {self.nodes[1].getnewaddress():29.99}, 0, {"feeRate": 10})
# partially sign multisig things with node 1 # partially sign multisig things with node 1

View File

@ -47,7 +47,7 @@ if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' |
fi fi
if ! command -v yq > /dev/null; then if ! command -v yq > /dev/null; then
echo "Skipping Gitian desriptor scripts checking since yq is not installed." echo "Skipping Gitian descriptor scripts checking since yq is not installed."
exit $EXIT_CODE exit $EXIT_CODE
fi fi

View File

@ -13,3 +13,9 @@ cachable
errorstring errorstring
keyserver keyserver
homogenous homogenous
hist
ser
unser
crypted
fo
stoll