diff --git a/src/httpserver.cpp b/src/httpserver.cpp --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -39,7 +39,7 @@ static const size_t MAX_HEADERS_SIZE = 8192; /** HTTP request work item */ -class HTTPWorkItem : public HTTPClosure { +class HTTPWorkItem final : public HTTPClosure { public: HTTPWorkItem(Config &_config, std::unique_ptr _req, const std::string &_path, const HTTPRequestHandler &_func) @@ -591,10 +591,10 @@ struct evbuffer *evb = evhttp_request_get_output_buffer(req); assert(evb); evbuffer_add(evb, strReply.data(), strReply.size()); - HTTPEvent *ev = - new HTTPEvent(eventBase, true, std::bind(evhttp_send_reply, req, - nStatus, (const char *)nullptr, - (struct evbuffer *)nullptr)); + HTTPEvent *ev = new HTTPEvent(eventBase, true, + std::bind(evhttp_send_reply, req, nStatus, + (const char *)nullptr, + (struct evbuffer *)nullptr)); ev->trigger(0); replySent = true; // transferred back to main thread. diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -139,7 +139,7 @@ * the chainstate, while keeping user interface out of the common library, which * is shared between bitcoind, and bitcoin-qt and non-server tools. */ -class CCoinsViewErrorCatcher : public CCoinsViewBacked { +class CCoinsViewErrorCatcher final : public CCoinsViewBacked { public: CCoinsViewErrorCatcher(CCoinsView *view) : CCoinsViewBacked(view) {} bool GetCoin(const COutPoint &outpoint, Coin &coin) const override { @@ -460,9 +460,8 @@ _("Discover own IP addresses (default: 1 when " "listening and no -externalip or -proxy)")); strUsage += HelpMessageOpt( - "-dns", - _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + - strprintf(_("(default: %d)"), DEFAULT_NAME_LOOKUP)); + "-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + + " " + strprintf(_("(default: %d)"), DEFAULT_NAME_LOOKUP)); strUsage += HelpMessageOpt( "-dnsseed", _("Query for peer addresses via DNS lookup, if low on " "addresses (default: 1 unless -connect/-noconnect)")); @@ -562,9 +561,10 @@ _("Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) " "or CIDR notated network (e.g. 1.2.3.0/24). Can be specified " "multiple times.") + - " " + _("Whitelisted peers cannot be DoS banned and their " - "transactions are always relayed, even if they are already " - "in the mempool, useful e.g. for a gateway")); + " " + + _("Whitelisted peers cannot be DoS banned and their " + "transactions are always relayed, even if they are already " + "in the mempool, useful e.g. for a gateway")); strUsage += HelpMessageOpt( "-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted " @@ -682,8 +682,9 @@ strprintf(_("Output debugging information (default: %u, supplying " " is optional)"), 0) + - ". " + _("If is not supplied or if = 1, " - "output all debugging information.") + + ". " + + _("If is not supplied or if = 1, " + "output all debugging information.") + _(" can be:") + " " + ListLogCategories() + "."); strUsage += HelpMessageOpt( "-debugexclude=", @@ -895,8 +896,9 @@ strprintf(_("Please contribute if you find %s useful. " "Visit %s for further information about the software."), PACKAGE_NAME, URL_WEBSITE) + - "\n" + strprintf(_("The source code is available from %s."), - URL_SOURCE_CODE) + + "\n" + + strprintf(_("The source code is available from %s."), + URL_SOURCE_CODE) + "\n" + "\n" + _("This is experimental software.") + "\n" + strprintf(_("Distributed under the MIT software license, see the " "accompanying file %s or %s"), @@ -1924,11 +1926,11 @@ // total cache cannot be greater than nMaxDbcache nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); int64_t nBlockTreeDBCache = nTotalCache / 8; - nBlockTreeDBCache = std::min(nBlockTreeDBCache, - (GetBoolArg("-txindex", DEFAULT_TXINDEX) - ? nMaxBlockDBAndTxIndexCache - : nMaxBlockDBCache) - << 20); + nBlockTreeDBCache = + std::min(nBlockTreeDBCache, (GetBoolArg("-txindex", DEFAULT_TXINDEX) + ? nMaxBlockDBAndTxIndexCache + : nMaxBlockDBCache) + << 20); nTotalCache -= nBlockTreeDBCache; // use 25%-50% of the remainder for disk cache int64_t nCoinDBCache = @@ -2036,9 +2038,8 @@ } uiInterface.InitMessage(_("Verifying blocks...")); - if (fHavePruned && - GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > - MIN_BLOCKS_TO_KEEP) { + if (fHavePruned && GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > + MIN_BLOCKS_TO_KEEP) { LogPrintf("Prune: pruned datadir may not have more than %d " "blocks; only checking available blocks", MIN_BLOCKS_TO_KEEP); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -583,7 +583,7 @@ * transactions and balances, and provides the ability to create new * transactions. */ -class CWallet : public CCryptoKeyStore, public CValidationInterface { +class CWallet final : public CCryptoKeyStore, public CValidationInterface { private: static std::atomic fFlushScheduled; @@ -1127,7 +1127,7 @@ }; /** A key allocated from the key pool. */ -class CReserveKey : public CReserveScript { +class CReserveKey final : public CReserveScript { protected: CWallet *pwallet; int64_t nIndex; diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -13,7 +13,7 @@ class CBlockIndex; class CZMQAbstractNotifier; -class CZMQNotificationInterface : public CValidationInterface { +class CZMQNotificationInterface final : public CValidationInterface { public: virtual ~CZMQNotificationInterface();