From 99f3bfcd240b6d66ed698266d4024646c659369e Mon Sep 17 00:00:00 2001 From: Scott Schurr Date: Mon, 11 Dec 2017 12:16:09 -0800 Subject: [PATCH] [FOLD] Reduce scope of constant --- src/ripple/overlay/impl/PeerImp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ripple/overlay/impl/PeerImp.cpp b/src/ripple/overlay/impl/PeerImp.cpp index 435ee8b646b..6610059c83c 100644 --- a/src/ripple/overlay/impl/PeerImp.cpp +++ b/src/ripple/overlay/impl/PeerImp.cpp @@ -45,9 +45,6 @@ using namespace std::chrono_literals; namespace ripple { -// The maximum number of transactions to have in the job queue. -int const max_transactions = 1000; - PeerImp::PeerImp (Application& app, id_t id, endpoint_type remote_endpoint, PeerFinder::Slot::ptr const& slot, http_request_type&& request, protocol::TMHello const& hello, PublicKey const& publicKey, @@ -1091,6 +1088,9 @@ PeerImp::onMessage (std::shared_ptr const& m) } } + // The maximum number of transactions to have in the job queue. + constexpr int max_transactions = 1000; + if (app_.getJobQueue().getJobCount(jtTRANSACTION) > max_transactions) { JLOG(p_journal_.info()) << "Transaction queue is full";