aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2024-03-21 11:35:11 +0000
committerdergoegge <n.goeggi@gmail.com>2024-04-07 14:04:45 +0100
commit78407b99ed6dd17f687fcbfb0486ecc433302287 (patch)
tree61eca950e0d5b18ee4a8616ef913cf9ba3613746 /src/wallet
parentf0794cbd405636a7f528a60f2873050b865cf7e8 (diff)
downloadbitcoin-78407b99ed6dd17f687fcbfb0486ecc433302287.tar.xz
[clang-tidy] Enable the misc-no-recursion check
Co-authored-by: stickies-v <stickies-v@protonmail.com> Co-authored-by: Gloria Zhao <gloriajzhao@gmail.com>
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/receive.cpp1
-rw-r--r--src/wallet/rpc/addresses.cpp3
-rw-r--r--src/wallet/rpc/backup.cpp1
-rw-r--r--src/wallet/scriptpubkeyman.cpp1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/receive.cpp b/src/wallet/receive.cpp
index ea3ffff549..c164266f80 100644
--- a/src/wallet/receive.cpp
+++ b/src/wallet/receive.cpp
@@ -253,6 +253,7 @@ bool CachedTxIsFromMe(const CWallet& wallet, const CWalletTx& wtx, const isminef
return (CachedTxGetDebit(wallet, wtx, filter) > 0);
}
+// NOLINTNEXTLINE(misc-no-recursion)
bool CachedTxIsTrusted(const CWallet& wallet, const CWalletTx& wtx, std::set<uint256>& trusted_parents)
{
AssertLockHeld(wallet.cs_wallet);
diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp
index acaa2d8b15..7f068c05ef 100644
--- a/src/wallet/rpc/addresses.cpp
+++ b/src/wallet/rpc/addresses.cpp
@@ -395,6 +395,7 @@ class DescribeWalletAddressVisitor
public:
const SigningProvider * const provider;
+ // NOLINTNEXTLINE(misc-no-recursion)
void ProcessSubScript(const CScript& subscript, UniValue& obj) const
{
// Always present: script type and redeemscript
@@ -445,6 +446,7 @@ public:
return obj;
}
+ // NOLINTNEXTLINE(misc-no-recursion)
UniValue operator()(const ScriptHash& scripthash) const
{
UniValue obj(UniValue::VOBJ);
@@ -465,6 +467,7 @@ public:
return obj;
}
+ // NOLINTNEXTLINE(misc-no-recursion)
UniValue operator()(const WitnessV0ScriptHash& id) const
{
UniValue obj(UniValue::VOBJ);
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
index 5167e986b1..ae2dfe5795 100644
--- a/src/wallet/rpc/backup.cpp
+++ b/src/wallet/rpc/backup.cpp
@@ -854,6 +854,7 @@ enum class ScriptContext
// Analyse the provided scriptPubKey, determining which keys and which redeem scripts from the ImportData struct are needed to spend it, and mark them as used.
// Returns an error string, or the empty string for success.
+// NOLINTNEXTLINE(misc-no-recursion)
static std::string RecurseImportData(const CScript& script, ImportData& import_data, const ScriptContext script_ctx)
{
// Use Solver to obtain script type and parsed pubkeys or hashes:
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index 59171f6db7..b42275fe4b 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -97,6 +97,7 @@ bool HaveKeys(const std::vector<valtype>& pubkeys, const LegacyScriptPubKeyMan&
//! @param recurse_scripthash whether to recurse into nested p2sh and p2wsh
//! scripts or simply treat any script that has been
//! stored in the keystore as spendable
+// NOLINTNEXTLINE(misc-no-recursion)
IsMineResult IsMineInner(const LegacyScriptPubKeyMan& keystore, const CScript& scriptPubKey, IsMineSigVersion sigversion, bool recurse_scripthash=true)
{
IsMineResult ret = IsMineResult::NO;