Skip to content

Commit

Permalink
[FOLD] Reduce scope of constant
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschurr committed Dec 11, 2017
1 parent ce6948f commit 99f3bfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ripple/overlay/impl/PeerImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1091,6 +1088,9 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMTransaction> 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";
Expand Down

0 comments on commit 99f3bfc

Please sign in to comment.