Skip to content

Commit fc48a13

Browse files
committed
merge bitcoin#23524: Fix typos in endif header comments
1 parent 1f8c3b5 commit fc48a13

33 files changed

+34
-34
lines changed

src/banman.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ class BanMan
9797
CRollingBloomFilter m_discouraged GUARDED_BY(m_cs_banned) {50000, 0.000001};
9898
};
9999

100-
#endif
100+
#endif // BITCOIN_BANMAN_H

src/batchedlogger.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ class CBatchedLogger
3535
void Flush();
3636
};
3737

38-
#endif//BITCOIN_BATCHEDLOGGER_H
38+
#endif // BITCOIN_BATCHEDLOGGER_H

src/coinjoin/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ constexpr int CalculateAmountPriority(CAmount nInputAmount)
132132

133133
} // namespace CoinJoin
134134

135-
#endif
135+
#endif // BITCOIN_COINJOIN_COMMON_H

src/consensus/amount.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ static constexpr CAmount COIN = 100000000;
2626
static constexpr CAmount MAX_MONEY = 21000000 * COIN;
2727
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
2828

29-
#endif // BITCOIN_CONSENSUS_AMOUNT_H
29+
#endif // BITCOIN_CONSENSUS_AMOUNT_H

src/context.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ T* GetContext(const CoreContext& context) noexcept
3333
: nullptr;
3434
}
3535

36-
#endif // BITCOIN_CONTEXT_VARIANT_H
36+
#endif // BITCOIN_CONTEXT_H

src/evo/creditpool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ std::optional<CCreditPoolDiff> GetCreditPoolDiffForBlock(CCreditPoolManager& cpo
141141
const CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams,
142142
const CAmount blockSubsidy, BlockValidationState& state);
143143

144-
#endif
144+
#endif // BITCOIN_EVO_CREDITPOOL_H

src/evo/dmnstate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,4 +377,4 @@ class CDeterministicMNStateDiff
377377
};
378378

379379

380-
#endif //BITCOIN_EVO_DMNSTATE_H
380+
#endif // BITCOIN_EVO_DMNSTATE_H

src/governance/common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ class Object
8181
}
8282
}
8383
};
84-
8584
} // namespace Governance
86-
#endif
85+
86+
#endif // BITCOIN_GOVERNANCE_COMMON_H

src/httprpc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ void InterruptREST();
3131
*/
3232
void StopREST();
3333

34-
#endif
34+
#endif // BITCOIN_HTTPRPC_H

src/i2p.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,4 @@ class Session
286286
} // namespace sam
287287
} // namespace i2p
288288

289-
#endif /* BITCOIN_I2P_H */
289+
#endif // BITCOIN_I2P_H

src/llmq/snapshot.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,4 @@ extern std::unique_ptr<CQuorumSnapshotManager> quorumSnapshotManager;
233233

234234
} // namespace llmq
235235

236-
#endif //BITCOIN_LLMQ_SNAPSHOT_H
236+
#endif // BITCOIN_LLMQ_SNAPSHOT_H

src/node/psbt.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ struct PSBTAnalysis {
5050
*/
5151
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx);
5252

53-
#endif // BITCOIN_PSBT_H
53+
#endif // BITCOIN_NODE_PSBT_H

src/policy/feerate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ class CFeeRate
6666
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
6767
};
6868

69-
#endif // BITCOIN_POLICY_FEERATE_H
69+
#endif // BITCOIN_POLICY_FEERATE_H

src/randomenv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ void RandAddDynamicEnv(CSHA512& hasher);
1414
/** Gather non-cryptographic environment data that does not change over time. */
1515
void RandAddStaticEnv(CSHA512& hasher);
1616

17-
#endif
17+
#endif // BITCOIN_RANDOMENV_H

src/rpc/blockchain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
6464
*/
6565
UniValue CreateUTXOSnapshot(NodeContext& node, CChainState& chainstate, CAutoFile& afile);
6666

67-
#endif
67+
#endif // BITCOIN_RPC_BLOCKCHAIN_H

src/rpc/index_util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ bool GetTimestampIndex(CBlockTreeDB& block_tree_db, const uint32_t high, const u
4242
std::vector<uint256>& hashes)
4343
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
4444

45-
#endif // BITCOIN_RPC_CLIENT_H
45+
#endif // BITCOIN_RPC_INDEX_UTIL_H

src/scheduler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ class SingleThreadedSchedulerClient
152152
size_t CallbacksPending() EXCLUSIVE_LOCKS_REQUIRED(!m_callbacks_mutex);
153153
};
154154

155-
#endif
155+
#endif // BITCOIN_SCHEDULER_H

src/shutdown.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ bool RestartRequested();
3636
*/
3737
void WaitForShutdown();
3838

39-
#endif
39+
#endif // BITCOIN_SHUTDOWN_H

src/span.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,4 @@ template<typename C>
295295
return span.end();
296296
}
297297

298-
#endif
298+
#endif // BITCOIN_SPAN_H

src/stacktraces.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ inline std::string GetExceptionWhat(const T& e)
3737
void RegisterPrettyTerminateHander();
3838
void RegisterPrettySignalHandlers();
3939

40-
#endif//BITCOIN_STACKTRACES_H
40+
#endif // BITCOIN_STACKTRACES_H

src/test/scriptnum10.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ class CScriptNum10
179179
};
180180

181181

182-
#endif // BITCOIN_TEST_BIGNUM_H
182+
#endif // BITCOIN_TEST_SCRIPTNUM10_H

src/test/util/setup_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,4 @@ class HasReason
250250
// define an implicit conversion here so that uint256 may be used directly in BOOST_CHECK_*
251251
std::ostream& operator<<(std::ostream& os, const uint256& num);
252252

253-
#endif
253+
#endif // BITCOIN_TEST_UTIL_SETUP_COMMON_H

src/threadinterrupt.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ class CThreadInterrupt
3232
std::atomic<bool> flag;
3333
};
3434

35-
#endif //BITCOIN_THREADINTERRUPT_H
35+
#endif // BITCOIN_THREADINTERRUPT_H

src/torcontrol.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ class TorController
159159
static void reconnect_cb(evutil_socket_t fd, short what, void *arg);
160160
};
161161

162-
#endif /* BITCOIN_TORCONTROL_H */
162+
#endif // BITCOIN_TORCONTROL_H

src/util/edge.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ class EdgeTriggeredEvents
5959
int m_fd{-1};
6060
};
6161

62-
#endif /* BITCOIN_UTIL_EDGE_H */
62+
#endif // BITCOIN_UTIL_EDGE_H

src/util/readwritefile.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ std::pair<bool,std::string> ReadBinaryFile(const fs::path &filename, size_t maxs
2525
*/
2626
bool WriteBinaryFile(const fs::path &filename, const std::string &data);
2727

28-
#endif /* BITCOIN_UTIL_READWRITEFILE_H */
28+
#endif // BITCOIN_UTIL_READWRITEFILE_H

src/util/trace.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
#endif
5656

5757

58-
#endif /* BITCOIN_UTIL_TRACE_H */
58+
#endif // BITCOIN_UTIL_TRACE_H

src/util/underlying.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ template <typename E>
1111
return static_cast<typename std::underlying_type<E>::type>(e);
1212
}
1313

14-
#endif //BITCOIN_UTIL_UNDERLYING_H
14+
#endif // BITCOIN_UTIL_UNDERLYING_H

src/util/wpipe.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ class WakeupPipe
5656
EdgeTriggeredEvents* m_edge_trig_events{nullptr};
5757
};
5858

59-
#endif /* BITCOIN_UTIL_WPIPE_H */
59+
#endif // BITCOIN_UTIL_WPIPE_H

src/wallet/rpcwallet.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ RPCHelpMan getaddressinfo();
4141
RPCHelpMan getrawchangeaddress();
4242
RPCHelpMan addmultisigaddress();
4343
RPCHelpMan signrawtransactionwithwallet();
44-
#endif //BITCOIN_WALLET_RPCWALLET_H
44+
#endif // BITCOIN_WALLET_RPCWALLET_H

src/warnings.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ void SetfLargeWorkInvalidChainFound(bool flag);
2020
*/
2121
bilingual_str GetWarnings(bool verbose);
2222

23-
#endif // BITCOIN_WARNINGS_H
23+
#endif // BITCOIN_WARNINGS_H

src/zmq/zmqrpc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class CRPCTable;
99

1010
void RegisterZMQRPCCommands(CRPCTable& t);
1111

12-
#endif // BITCOIN_ZMQ_ZMRRPC_H
12+
#endif // BITCOIN_ZMQ_ZMQRPC_H

test/lint/lint-include-guards.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_W
1717
do
1818
HEADER_ID_BASE=$(cut -f2- -d/ <<< "${HEADER_FILE}" | sed "s/\.h$//g" | tr / _ | tr - _ | tr "[:lower:]" "[:upper:]")
1919
HEADER_ID="${HEADER_ID_PREFIX}${HEADER_ID_BASE}${HEADER_ID_SUFFIX}"
20-
if [[ $(grep -cE "^#(ifndef|define) ${HEADER_ID}" "${HEADER_FILE}") != 2 ]]; then
20+
if [[ $(grep --count --extended-regexp "^#(ifndef|define|endif //) ${HEADER_ID}" "${HEADER_FILE}") != 3 ]]; then
2121
echo "${HEADER_FILE} seems to be missing the expected include guard:"
2222
echo " #ifndef ${HEADER_ID}"
2323
echo " #define ${HEADER_ID}"

0 commit comments

Comments
 (0)