0diff --git a/src/bench/ccoins_caching.cpp b/src/bench/ccoins_caching.cpp
1index c677fb1c16..9a31cecd7a 100644
2--- a/src/bench/ccoins_caching.cpp
3+++ b/src/bench/ccoins_caching.cpp
4@@ -44,7 +44,7 @@ static void CCoinsCaching(benchmark::Bench& bench)
5 // Benchmark.
6 const CTransaction tx_1(t1);
7 bench.run([&] {
8- auto result{AreInputsStandard(tx_1, coins)};
9+ auto result{HasNonStandardInput(tx_1, coins)};
10 assert(!result.has_value());
11 });
12 ECC_Stop();
13diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
14index c093cb3923..aada94d909 100644
15--- a/src/policy/policy.cpp
16+++ b/src/policy/policy.cpp
17@@ -175,7 +175,7 @@ bool IsStandardTx(const CTransaction& tx, const std::optional<unsigned>& max_dat
18 *
19 * Note that only the non-witness portion of the transaction is checked here.
20 */
21-std::optional<NonStandardInputsReason> AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
22+std::optional<NonStandardInputsReason> HasNonStandardInput(const CTransaction& tx, const CCoinsViewCache& mapInputs)
23 {
24 if (tx.IsCoinBase()) {
25 return std::nullopt; // Coinbases don't use vin normally
26@@ -187,32 +187,27 @@ std::optional<NonStandardInputsReason> AreInputsStandard(const CTransaction& tx,
27 std::vector<std::vector<unsigned char> > vSolutions;
28 TxoutType whichType = Solver(prev.scriptPubKey, vSolutions);
29 if (whichType == TxoutType::NONSTANDARD) {
30- auto result = NonStandardInputsReason{"bad-txns-input-script-nonstandard", strprintf("input %u", i)};
31- return result;
32+ return NonStandardInputsReason{"bad-txns-input-script-nonstandard", strprintf("input %u", i)};
33 } else if (whichType == TxoutType::WITNESS_UNKNOWN) {
34 // WITNESS_UNKNOWN failures are typically also caught with a policy
35 // flag in the script interpreter, but it can be helpful to catch
36 // this type of NONSTANDARD transaction earlier in transaction
37 // validation.
38- auto result = NonStandardInputsReason{"bad-txns-input-witness-unknown", strprintf("input %u", i)};
39- return result;
40+ return NonStandardInputsReason{"bad-txns-input-witness-unknown", strprintf("input %u", i)};
41 } else if (whichType == TxoutType::SCRIPTHASH) {
42 std::vector<std::vector<unsigned char> > stack;
43 ScriptError serror;
44 // convert the scriptSig into a stack, so we can inspect the redeemScript
45 if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SigVersion::BASE, &serror)) {
46- auto result = NonStandardInputsReason{"bad-txns-input-scriptsig-failure", strprintf("input %u: %s", i, ScriptErrorString(serror))};
47- return result;
48+ return NonStandardInputsReason{"bad-txns-input-scriptsig-failure", strprintf("input %u: %s", i, ScriptErrorString(serror))};
49 }
50 if (stack.empty()) {
51- auto result = NonStandardInputsReason{"bad-txns-input-p2sh-no-redeemscript", strprintf("input %u", i)};
52- return result;
53+ return NonStandardInputsReason{"bad-txns-input-p2sh-no-redeemscript", strprintf("input %u", i)};
54 }
55 CScript subscript(stack.back().begin(), stack.back().end());
56 unsigned int sigop_count = subscript.GetSigOpCount(true);
57 if (sigop_count > MAX_P2SH_SIGOPS) {
58- auto result = NonStandardInputsReason{"bad-txns-input-scriptcheck-sigops", strprintf("input %u: %u > %u", i, sigop_count, MAX_P2SH_SIGOPS)};
59- return result;
60+ return NonStandardInputsReason{"bad-txns-input-scriptcheck-sigops", strprintf("input %u: %u > %u", i, sigop_count, MAX_P2SH_SIGOPS)};
61 }
62 }
63 }
64diff --git a/src/policy/policy.h b/src/policy/policy.h
65index 3986f7d709..3d7d4b7e5c 100644
66--- a/src/policy/policy.h
67+++ b/src/policy/policy.h
68@@ -149,7 +149,7 @@ bool IsStandardTx(const CTransaction& tx, const std::optional<unsigned>& max_dat
69 * [@return](/bitcoin-bitcoin/contributor/return/) std::nullopt if all inputs (scriptSigs) use only standard transaction forms else returns
70 * NonStandardInputsReason which states why an input is not standard.
71 */
72-std::optional<NonStandardInputsReason> AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
73+std::optional<NonStandardInputsReason> HasNonStandardInput(const CTransaction& tx, const CCoinsViewCache& mapInputs);
74 /**
75 * Check if the transaction is over standard P2WSH resources limit:
76 * 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements
77diff --git a/src/test/fuzz/coins_view.cpp b/src/test/fuzz/coins_view.cpp
78index 8f3e357a84..e210b2a13d 100644
79--- a/src/test/fuzz/coins_view.cpp
80+++ b/src/test/fuzz/coins_view.cpp
81@@ -235,7 +235,7 @@ FUZZ_TARGET(coins_view, .init = initialize_coins_view)
82 assert(expected_code_path);
83 },
84 [&] {
85- (void)AreInputsStandard(CTransaction{random_mutable_transaction}, coins_view_cache);
86+ (void)HasNonStandardInput(CTransaction{random_mutable_transaction}, coins_view_cache);
87 },
88 [&] {
89 TxValidationState state;
90diff --git a/src/test/fuzz/transaction.cpp b/src/test/fuzz/transaction.cpp
91index 2a043f7458..785c823e37 100644
92--- a/src/test/fuzz/transaction.cpp
93+++ b/src/test/fuzz/transaction.cpp
94@@ -87,7 +87,7 @@ FUZZ_TARGET(transaction, .init = initialize_transaction)
95
96 CCoinsView coins_view;
97 const CCoinsViewCache coins_view_cache(&coins_view);
98- (void)AreInputsStandard(tx, coins_view_cache);
99+ (void)HasNonStandardInput(tx, coins_view_cache);
100 (void)IsWitnessStandard(tx, coins_view_cache);
101
102 if (tx.GetTotalSize() < 250'000) { // Avoid high memory usage (with msan) due to json encoding
103diff --git a/src/test/script_p2sh_tests.cpp b/src/test/script_p2sh_tests.cpp
104index 500ec0bd6b..32907bdd24 100644
105--- a/src/test/script_p2sh_tests.cpp
106+++ b/src/test/script_p2sh_tests.cpp
107@@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(switchover)
108 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EQUALVERIFY, ScriptErrorString(err));
109 }
110
111-BOOST_AUTO_TEST_CASE(AreInputsStandard)
112+BOOST_AUTO_TEST_CASE(GetFirstNonStandardInput)
113 {
114 CCoinsView coinsDummy;
115 CCoinsViewCache coins(&coinsDummy);
116@@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
117 txTo.vin[3].scriptSig << OP_11 << OP_11 << std::vector<unsigned char>(oneAndTwo.begin(), oneAndTwo.end());
118 txTo.vin[4].scriptSig << std::vector<unsigned char>(fifteenSigops.begin(), fifteenSigops.end());
119
120- BOOST_CHECK(!::AreInputsStandard(CTransaction(txTo), coins).has_value());
121+ BOOST_CHECK(!::HasNonStandardInput(CTransaction(txTo), coins).has_value());
122 // 22 P2SH sigops for all inputs (1 for vin[0], 6 for vin[3], 15 for vin[4]
123 BOOST_CHECK_EQUAL(GetP2SHSigOpCount(CTransaction(txTo), coins), 22U);
124
125@@ -380,7 +380,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
126 txToNonStd1.vin[0].prevout.hash = txFrom.GetHash();
127 txToNonStd1.vin[0].scriptSig << std::vector<unsigned char>(sixteenSigops.begin(), sixteenSigops.end());
128
129- const auto txToNonStd1_res = ::AreInputsStandard(CTransaction(txToNonStd1), coins);
130+ const auto txToNonStd1_res = ::HasNonStandardInput(CTransaction(txToNonStd1), coins);
131 BOOST_CHECK(txToNonStd1_res.has_value());
132 BOOST_CHECK_EQUAL(txToNonStd1_res->reason, "bad-txns-input-scriptcheck-sigops");
133 BOOST_CHECK_EQUAL(txToNonStd1_res->debug, "input 0: 16 > 15");
134@@ -398,7 +398,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
135
136 std::vector<std::vector<unsigned char>> vSolutions;
137 BOOST_CHECK_EQUAL(Solver(txFrom.vout[6].scriptPubKey, vSolutions), TxoutType::SCRIPTHASH);
138- const auto txToNonStd2_res = ::AreInputsStandard(CTransaction(txToNonStd2), coins);
139+ const auto txToNonStd2_res = ::HasNonStandardInput(CTransaction(txToNonStd2), coins);
140 BOOST_CHECK(txToNonStd2_res.has_value());
141 BOOST_CHECK_EQUAL(txToNonStd2_res->reason, "bad-txns-input-scriptcheck-sigops");
142 BOOST_CHECK_EQUAL(txToNonStd2_res->debug, "input 0: 20 > 15");
143@@ -413,7 +413,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
144 txToNonStd2_no_scriptSig.vin[0].prevout.hash = txFrom.GetHash();
145
146 BOOST_CHECK_EQUAL(Solver(txFrom.vout[6].scriptPubKey, vSolutions), TxoutType::SCRIPTHASH);
147- const auto txToNonStd2_no_scriptSig_res = ::AreInputsStandard(CTransaction(txToNonStd2_no_scriptSig), coins);
148+ const auto txToNonStd2_no_scriptSig_res = ::HasNonStandardInput(CTransaction(txToNonStd2_no_scriptSig), coins);
149 BOOST_CHECK(txToNonStd2_no_scriptSig_res.has_value());
150 BOOST_CHECK_EQUAL(txToNonStd2_no_scriptSig_res->reason, "bad-txns-input-p2sh-no-redeemscript");
151 BOOST_CHECK_EQUAL(txToNonStd2_no_scriptSig_res->debug, "input 0");
152@@ -429,7 +429,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
153 txToNonStd3.vin[0].prevout.hash = txFrom.GetHash();
154
155 BOOST_CHECK_EQUAL(Solver(txFrom.vout[7].scriptPubKey, vSolutions), TxoutType::NONSTANDARD);
156- const auto txToNonStd3_res = ::AreInputsStandard(CTransaction(txToNonStd3), coins);
157+ const auto txToNonStd3_res = ::HasNonStandardInput(CTransaction(txToNonStd3), coins);
158 BOOST_CHECK(txToNonStd3_res.has_value());
159 BOOST_CHECK_EQUAL(txToNonStd3_res->reason, "bad-txns-input-script-nonstandard");
160 BOOST_CHECK_EQUAL(txToNonStd3_res->debug, "input 0");
161@@ -451,7 +451,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
162 BOOST_CHECK_EQUAL(Solver(txFrom.vout[8].scriptPubKey, vSolutions), TxoutType::SCRIPTHASH);
163 BOOST_CHECK(!EvalScript(stack, txToNonStd4.vin[0].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SigVersion::BASE, &serror));
164 BOOST_CHECK_EQUAL(serror, SCRIPT_ERR_OP_RETURN);
165- const auto txToNonStd4_res = ::AreInputsStandard(CTransaction(txToNonStd4), coins);
166+ const auto txToNonStd4_res = ::HasNonStandardInput(CTransaction(txToNonStd4), coins);
167 BOOST_CHECK(txToNonStd4_res.has_value());
168 BOOST_CHECK_EQUAL(txToNonStd4_res->reason, "bad-txns-input-scriptsig-failure");
169 BOOST_CHECK_EQUAL(txToNonStd4_res->debug, "input 0: OP_RETURN was encountered");
170@@ -465,7 +465,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
171 txWitnessUnknown.vin[0].prevout.n = 9;
172 txWitnessUnknown.vin[0].prevout.hash = txFrom.GetHash();
173 BOOST_CHECK_EQUAL(Solver(txFrom.vout[9].scriptPubKey, vSolutions), TxoutType::WITNESS_UNKNOWN);
174- const auto txWitnessUnknown_res = ::AreInputsStandard(CTransaction(txWitnessUnknown), coins);
175+ const auto txWitnessUnknown_res = ::HasNonStandardInput(CTransaction(txWitnessUnknown), coins);
176 BOOST_CHECK(txWitnessUnknown_res.has_value());
177 BOOST_CHECK_EQUAL(txWitnessUnknown_res->reason, "bad-txns-input-witness-unknown");
178 BOOST_CHECK_EQUAL(txWitnessUnknown_res->debug, "input 0");
179diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
180index e2443a2fce..05074eb631 100644
181--- a/src/test/transaction_tests.cpp
182+++ b/src/test/transaction_tests.cpp
183@@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE(test_Get)
184 t1.vout[0].nValue = 90*CENT;
185 t1.vout[0].scriptPubKey << OP_1;
186
187- BOOST_CHECK(!AreInputsStandard(CTransaction(t1), coins).has_value());
188+ BOOST_CHECK(!HasNonStandardInput(CTransaction(t1), coins).has_value());
189 }
190
191 static void CreateCreditAndSpend(const FillableSigningProvider& keystore, const CScript& outscript, CTransactionRef& output, CMutableTransaction& input, bool success = true)
192diff --git a/src/validation.cpp b/src/validation.cpp
193index 96204b2ab4..cdcf56860f 100644
194--- a/src/validation.cpp
195+++ b/src/validation.cpp
196@@ -822,7 +822,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
197 return false; // state filled in by CheckTxInputs
198 }
199
200- const auto inputs_standardness_result = AreInputsStandard(tx, m_view);
201+ const auto inputs_standardness_result = HasNonStandardInput(tx, m_view);
202 if (m_pool.m_require_standard && inputs_standardness_result.has_value()) {
203 return state.Invalid(TxValidationResult::TX_INPUTS_NOT_STANDARD, inputs_standardness_result.value().reason, inputs_standardness_result.value().debug);
204 }