From 7193245cd66791216d4e586ca09302b26d4b7528 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 18 Feb 2025 10:29:51 +0000 Subject: [PATCH] doc: remove For ... comments We don't add or maintain these, and they are of little value, as well as having the effect of polluting diffs. They are also wrong, i.e DEFAULT_SCRIPTCHECK_THREADS is not in validation.h. --- src/banman.h | 4 ++-- src/common/args.cpp | 8 ++++---- src/crypto/sha3.cpp | 7 +++---- src/cuckoocache.h | 2 +- src/headerssync.h | 4 ++-- src/httpserver.cpp | 6 ++++-- src/index/base.cpp | 7 ++++++- src/interfaces/chain.h | 9 +++++---- src/interfaces/mining.h | 24 ++++++++++++------------ src/interfaces/node.h | 16 ++++++++-------- src/qt/bantablemodel.cpp | 4 ++-- src/qt/guiutil.cpp | 4 ++-- src/qt/optionsmodel.cpp | 9 ++++----- src/qt/peertablemodel.h | 4 ++-- src/qt/signverifymessagedialog.cpp | 6 ++++-- src/qt/walletmodel.cpp | 10 ++++++---- src/rpc/net.cpp | 11 +++++++---- src/support/lockedpool.cpp | 9 ++++----- src/test/util_tests.cpp | 11 ++++++----- src/txrequest.h | 8 ++++---- src/util/fs_helpers.cpp | 6 +++--- src/validation.h | 2 +- src/validationinterface.h | 4 ++-- src/wallet/migrate.cpp | 7 ++++++- src/wallet/spend.h | 9 +++++++-- src/wallet/test/db_tests.cpp | 7 ++++++- 26 files changed, 113 insertions(+), 85 deletions(-) diff --git a/src/banman.h b/src/banman.h index 23e19506df6..93149e63c5a 100644 --- a/src/banman.h +++ b/src/banman.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2022 The Bitcoin Core developers +// Copyright (c) 2009-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_BANMAN_H @@ -7,7 +7,7 @@ #include #include -#include // For banmap_t +#include #include #include diff --git a/src/common/args.cpp b/src/common/args.cpp index 1e3f6d1b88d..71dcd1ac10c 100644 --- a/src/common/args.cpp +++ b/src/common/args.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2022 The Bitcoin Core developers +// Copyright (c) 2009-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -19,9 +19,9 @@ #include #ifdef WIN32 -#include /* for codecvt_utf8_utf16 */ -#include /* for CommandLineToArgvW */ -#include /* for CSIDL_APPDATA */ +#include +#include +#include #endif #include diff --git a/src/crypto/sha3.cpp b/src/crypto/sha3.cpp index 77ea2a8ebfb..4c61bce5f62 100644 --- a/src/crypto/sha3.cpp +++ b/src/crypto/sha3.cpp @@ -7,13 +7,12 @@ #include #include -#include #include -#include // For std::begin and std::end. +#include #include - -#include +#include +#include void KeccakF(uint64_t (&st)[25]) { diff --git a/src/cuckoocache.h b/src/cuckoocache.h index 83701793952..281efbd0696 100644 --- a/src/cuckoocache.h +++ b/src/cuckoocache.h @@ -7,7 +7,7 @@ #include -#include // std::find +#include #include #include #include diff --git a/src/headerssync.h b/src/headerssync.h index 5e399eb8615..2e7017f115d 100644 --- a/src/headerssync.h +++ b/src/headerssync.h @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Bitcoin Core developers +// Copyright (c) 2022-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,7 +8,7 @@ #include #include #include -#include // For NodeId +#include #include #include #include diff --git a/src/httpserver.cpp b/src/httpserver.cpp index bd2dec19b97..6bfeba90b36 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2022 The Bitcoin Core developers +// Copyright (c) 2015-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -11,7 +11,7 @@ #include #include #include -#include // For HTTP status codes +#include #include #include #include @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/src/index/base.cpp b/src/index/base.cpp index 1169a1c86b7..5767116ce53 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -17,9 +17,14 @@ #include #include #include -#include // For g_chainman +#include +#include +#include +#include +#include #include +#include #include constexpr uint8_t DB_BEST_BLOCK{'B'}; diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 6945416cced..de99262e982 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022 The Bitcoin Core developers +// Copyright (c) 2018-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -7,14 +7,15 @@ #include #include -#include // For CTransactionRef +#include #include +#include +#include #include +#include #include #include -#include -#include #include #include diff --git a/src/interfaces/mining.h b/src/interfaces/mining.h index 95658dd95b2..3ecb86e8ea1 100644 --- a/src/interfaces/mining.h +++ b/src/interfaces/mining.h @@ -1,22 +1,22 @@ -// Copyright (c) 2024 The Bitcoin Core developers +// Copyright (c) 2024-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_INTERFACES_MINING_H #define BITCOIN_INTERFACES_MINING_H -#include // for CAmount -#include // for BlockRef -#include // for BlockCreateOptions, BlockWaitOptions -#include // for CBlock, CBlockHeader -#include // for CTransactionRef -#include // for int64_t -#include // for uint256 -#include // for MillisecondsDouble +#include +#include +#include +#include +#include +#include +#include -#include // for unique_ptr, shared_ptr -#include // for optional -#include // for vector +#include +#include +#include +#include namespace node { struct NodeContext; diff --git a/src/interfaces/node.h b/src/interfaces/node.h index b7bcb431214..a17aa4afefc 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022 The Bitcoin Core developers +// Copyright (c) 2018-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -6,13 +6,13 @@ #define BITCOIN_INTERFACES_NODE_H #include -#include // For CAmount -#include // For BCLog::CategoryMask -#include // For NodeId -#include // For banmap_t -#include // For Network -#include // For ConnectionDirection -#include // For SecureString +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index 4592d29abc9..d19d30fc410 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -1,11 +1,11 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include -#include // For banmap_t +#include #include diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index c1bf5a56032..adf54953675 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -64,7 +64,7 @@ #include #include #include -#include // for Qt::mightBeRichText +#include #include #include #include diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 5782a57a265..3d876a8f63b 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -17,9 +17,10 @@ #include #include #include +#include #include -#include // For DEFAULT_SCRIPTCHECK_THREADS -#include // For DEFAULT_SPEND_ZEROCONF_CHANGE +#include +#include #include #include @@ -27,8 +28,6 @@ #include #include -#include - const char *DEFAULT_GUI_PROXY_HOST = "127.0.0.1"; static QString GetDefaultProxyAddress(); diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h index a0174c3af40..5bc8c094e9b 100644 --- a/src/qt/peertablemodel.h +++ b/src/qt/peertablemodel.h @@ -1,11 +1,11 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_PEERTABLEMODEL_H #define BITCOIN_QT_PEERTABLEMODEL_H -#include // For CNodeStateStats +#include #include #include diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp index e46fe061624..e87f1b84f67 100644 --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -10,11 +10,13 @@ #include #include -#include // For MessageSign(), MessageVerify() +#include #include // IWYU pragma: keep #include #include +#include +#include #include #include diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 81af94ac8e9..a2fb50739a5 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2022 The Bitcoin Core developers +// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -14,7 +14,7 @@ #include #include -#include // for GetBoolArg +#include #include #include #include @@ -23,10 +23,12 @@ #include #include #include -#include // for CRecipient +#include -#include +#include #include +#include +#include #include #include diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index d46e3e99132..2739b0d7dd0 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2009-2022 The Bitcoin Core developers +// Copyright (c) 2009-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -12,7 +12,7 @@ #include #include #include -#include // For banmap_t +#include #include #include #include @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -31,9 +32,11 @@ #include #include +#include #include - -#include +#include +#include +#include using node::NodeContext; using util::Join; diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp index 01eef2b93d3..cbb117fc3e1 100644 --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022 The Bitcoin Core developers +// Copyright (c) 2016-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,10 +8,9 @@ #ifdef WIN32 #include #else -#include // for mmap -#include // for getrlimit -#include // for PAGESIZE -#include // for sysconf +#include +#include +#include #endif #include diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index dc0e630a225..df481ff3f57 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -3,9 +3,9 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include -#include // For MessageSign(), MessageVerify(), MESSAGE_MAGIC -#include // For Hash() -#include // For CKey +#include +#include +#include #include