Skip to content

Commit

Permalink
merge bitcoin#23524: Fix typos in endif header comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Dec 4, 2024
1 parent 1f8c3b5 commit fc48a13
Show file tree
Hide file tree
Showing 33 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/banman.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ class BanMan
CRollingBloomFilter m_discouraged GUARDED_BY(m_cs_banned) {50000, 0.000001};
};

#endif
#endif // BITCOIN_BANMAN_H
2 changes: 1 addition & 1 deletion src/batchedlogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ class CBatchedLogger
void Flush();
};

#endif//BITCOIN_BATCHEDLOGGER_H
#endif // BITCOIN_BATCHEDLOGGER_H
2 changes: 1 addition & 1 deletion src/coinjoin/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ constexpr int CalculateAmountPriority(CAmount nInputAmount)

} // namespace CoinJoin

#endif
#endif // BITCOIN_COINJOIN_COMMON_H
2 changes: 1 addition & 1 deletion src/consensus/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ static constexpr CAmount COIN = 100000000;
static constexpr CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

#endif // BITCOIN_CONSENSUS_AMOUNT_H
#endif // BITCOIN_CONSENSUS_AMOUNT_H
2 changes: 1 addition & 1 deletion src/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ T* GetContext(const CoreContext& context) noexcept
: nullptr;
}

#endif // BITCOIN_CONTEXT_VARIANT_H
#endif // BITCOIN_CONTEXT_H
2 changes: 1 addition & 1 deletion src/evo/creditpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ std::optional<CCreditPoolDiff> GetCreditPoolDiffForBlock(CCreditPoolManager& cpo
const CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams,
const CAmount blockSubsidy, BlockValidationState& state);

#endif
#endif // BITCOIN_EVO_CREDITPOOL_H
2 changes: 1 addition & 1 deletion src/evo/dmnstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,4 @@ class CDeterministicMNStateDiff
};


#endif //BITCOIN_EVO_DMNSTATE_H
#endif // BITCOIN_EVO_DMNSTATE_H
4 changes: 2 additions & 2 deletions src/governance/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ class Object
}
}
};

} // namespace Governance
#endif

#endif // BITCOIN_GOVERNANCE_COMMON_H
2 changes: 1 addition & 1 deletion src/httprpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ void InterruptREST();
*/
void StopREST();

#endif
#endif // BITCOIN_HTTPRPC_H
2 changes: 1 addition & 1 deletion src/i2p.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ class Session
} // namespace sam
} // namespace i2p

#endif /* BITCOIN_I2P_H */
#endif // BITCOIN_I2P_H
2 changes: 1 addition & 1 deletion src/llmq/snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ extern std::unique_ptr<CQuorumSnapshotManager> quorumSnapshotManager;

} // namespace llmq

#endif //BITCOIN_LLMQ_SNAPSHOT_H
#endif // BITCOIN_LLMQ_SNAPSHOT_H
2 changes: 1 addition & 1 deletion src/node/psbt.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ struct PSBTAnalysis {
*/
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx);

#endif // BITCOIN_PSBT_H
#endif // BITCOIN_NODE_PSBT_H
2 changes: 1 addition & 1 deletion src/policy/feerate.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ class CFeeRate
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
};

#endif // BITCOIN_POLICY_FEERATE_H
#endif // BITCOIN_POLICY_FEERATE_H
2 changes: 1 addition & 1 deletion src/randomenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ void RandAddDynamicEnv(CSHA512& hasher);
/** Gather non-cryptographic environment data that does not change over time. */
void RandAddStaticEnv(CSHA512& hasher);

#endif
#endif // BITCOIN_RANDOMENV_H
2 changes: 1 addition & 1 deletion src/rpc/blockchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
*/
UniValue CreateUTXOSnapshot(NodeContext& node, CChainState& chainstate, CAutoFile& afile);

#endif
#endif // BITCOIN_RPC_BLOCKCHAIN_H
2 changes: 1 addition & 1 deletion src/rpc/index_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bool GetTimestampIndex(CBlockTreeDB& block_tree_db, const uint32_t high, const u
std::vector<uint256>& hashes)
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);

#endif // BITCOIN_RPC_CLIENT_H
#endif // BITCOIN_RPC_INDEX_UTIL_H
2 changes: 1 addition & 1 deletion src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ class SingleThreadedSchedulerClient
size_t CallbacksPending() EXCLUSIVE_LOCKS_REQUIRED(!m_callbacks_mutex);
};

#endif
#endif // BITCOIN_SCHEDULER_H
2 changes: 1 addition & 1 deletion src/shutdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ bool RestartRequested();
*/
void WaitForShutdown();

#endif
#endif // BITCOIN_SHUTDOWN_H
2 changes: 1 addition & 1 deletion src/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@ template<typename C>
return span.end();
}

#endif
#endif // BITCOIN_SPAN_H
2 changes: 1 addition & 1 deletion src/stacktraces.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ inline std::string GetExceptionWhat(const T& e)
void RegisterPrettyTerminateHander();
void RegisterPrettySignalHandlers();

#endif//BITCOIN_STACKTRACES_H
#endif // BITCOIN_STACKTRACES_H
2 changes: 1 addition & 1 deletion src/test/scriptnum10.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ class CScriptNum10
};


#endif // BITCOIN_TEST_BIGNUM_H
#endif // BITCOIN_TEST_SCRIPTNUM10_H
2 changes: 1 addition & 1 deletion src/test/util/setup_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ class HasReason
// define an implicit conversion here so that uint256 may be used directly in BOOST_CHECK_*
std::ostream& operator<<(std::ostream& os, const uint256& num);

#endif
#endif // BITCOIN_TEST_UTIL_SETUP_COMMON_H
2 changes: 1 addition & 1 deletion src/threadinterrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ class CThreadInterrupt
std::atomic<bool> flag;
};

#endif //BITCOIN_THREADINTERRUPT_H
#endif // BITCOIN_THREADINTERRUPT_H
2 changes: 1 addition & 1 deletion src/torcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ class TorController
static void reconnect_cb(evutil_socket_t fd, short what, void *arg);
};

#endif /* BITCOIN_TORCONTROL_H */
#endif // BITCOIN_TORCONTROL_H
2 changes: 1 addition & 1 deletion src/util/edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ class EdgeTriggeredEvents
int m_fd{-1};
};

#endif /* BITCOIN_UTIL_EDGE_H */
#endif // BITCOIN_UTIL_EDGE_H
2 changes: 1 addition & 1 deletion src/util/readwritefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ std::pair<bool,std::string> ReadBinaryFile(const fs::path &filename, size_t maxs
*/
bool WriteBinaryFile(const fs::path &filename, const std::string &data);

#endif /* BITCOIN_UTIL_READWRITEFILE_H */
#endif // BITCOIN_UTIL_READWRITEFILE_H
2 changes: 1 addition & 1 deletion src/util/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
#endif


#endif /* BITCOIN_UTIL_TRACE_H */
#endif // BITCOIN_UTIL_TRACE_H
2 changes: 1 addition & 1 deletion src/util/underlying.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ template <typename E>
return static_cast<typename std::underlying_type<E>::type>(e);
}

#endif //BITCOIN_UTIL_UNDERLYING_H
#endif // BITCOIN_UTIL_UNDERLYING_H
2 changes: 1 addition & 1 deletion src/util/wpipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class WakeupPipe
EdgeTriggeredEvents* m_edge_trig_events{nullptr};
};

#endif /* BITCOIN_UTIL_WPIPE_H */
#endif // BITCOIN_UTIL_WPIPE_H
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ RPCHelpMan getaddressinfo();
RPCHelpMan getrawchangeaddress();
RPCHelpMan addmultisigaddress();
RPCHelpMan signrawtransactionwithwallet();
#endif //BITCOIN_WALLET_RPCWALLET_H
#endif // BITCOIN_WALLET_RPCWALLET_H
2 changes: 1 addition & 1 deletion src/warnings.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ void SetfLargeWorkInvalidChainFound(bool flag);
*/
bilingual_str GetWarnings(bool verbose);

#endif // BITCOIN_WARNINGS_H
#endif // BITCOIN_WARNINGS_H
2 changes: 1 addition & 1 deletion src/zmq/zmqrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class CRPCTable;

void RegisterZMQRPCCommands(CRPCTable& t);

#endif // BITCOIN_ZMQ_ZMRRPC_H
#endif // BITCOIN_ZMQ_ZMQRPC_H
2 changes: 1 addition & 1 deletion test/lint/lint-include-guards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_W
do
HEADER_ID_BASE=$(cut -f2- -d/ <<< "${HEADER_FILE}" | sed "s/\.h$//g" | tr / _ | tr - _ | tr "[:lower:]" "[:upper:]")
HEADER_ID="${HEADER_ID_PREFIX}${HEADER_ID_BASE}${HEADER_ID_SUFFIX}"
if [[ $(grep -cE "^#(ifndef|define) ${HEADER_ID}" "${HEADER_FILE}") != 2 ]]; then
if [[ $(grep --count --extended-regexp "^#(ifndef|define|endif //) ${HEADER_ID}" "${HEADER_FILE}") != 3 ]]; then
echo "${HEADER_FILE} seems to be missing the expected include guard:"
echo " #ifndef ${HEADER_ID}"
echo " #define ${HEADER_ID}"
Expand Down

0 comments on commit fc48a13

Please sign in to comment.