From 4b449b5c99154494ccbccf12f3004ad29dc4d6ac Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 10 Mar 2013 19:07:11 -0700 Subject: [PATCH] Fix sign. --- src/cpp/ripple/LoadManager.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpp/ripple/LoadManager.cpp b/src/cpp/ripple/LoadManager.cpp index 7bc23eb858..5384df4bda 100644 --- a/src/cpp/ripple/LoadManager.cpp +++ b/src/cpp/ripple/LoadManager.cpp @@ -24,18 +24,18 @@ LoadManager::LoadManager(int creditRate, int creditLimit, int debitWarn, int deb mCreditRate(creditRate), mCreditLimit(creditLimit), mDebitWarn(debitWarn), mDebitLimit(debitLimit), mShutdown(false), mUptime(0), mCosts(LT_MAX) { - addLoadCost(LoadCost(LT_InvalidRequest, 10, LC_CPU | LC_Network)); - addLoadCost(LoadCost(LT_RequestNoReply, 1, LC_CPU | LC_Disk)); - addLoadCost(LoadCost(LT_InvalidSignature, 100, LC_CPU)); - addLoadCost(LoadCost(LT_UnwantedData, 5, LC_CPU | LC_Network)); - addLoadCost(LoadCost(LT_BadData, 20, LC_CPU)); + addLoadCost(LoadCost(LT_InvalidRequest, -10, LC_CPU | LC_Network)); + addLoadCost(LoadCost(LT_RequestNoReply, -1, LC_CPU | LC_Disk)); + addLoadCost(LoadCost(LT_InvalidSignature, -100, LC_CPU)); + addLoadCost(LoadCost(LT_UnwantedData, -5, LC_CPU | LC_Network)); + addLoadCost(LoadCost(LT_BadData, -20, LC_CPU)); - addLoadCost(LoadCost(LT_NewTrusted, 10, 0)); - addLoadCost(LoadCost(LT_NewTransaction, 2, 0)); - addLoadCost(LoadCost(LT_NeededData, 10, 0)); + addLoadCost(LoadCost(LT_NewTrusted, -10, 0)); + addLoadCost(LoadCost(LT_NewTransaction, -2, 0)); + addLoadCost(LoadCost(LT_NeededData, -10, 0)); - addLoadCost(LoadCost(LT_RequestData, 5, LC_Disk | LC_Network)); - addLoadCost(LoadCost(LT_CheapQuery, 1, LC_CPU)); + addLoadCost(LoadCost(LT_RequestData, -5, LC_Disk | LC_Network)); + addLoadCost(LoadCost(LT_CheapQuery, -1, LC_CPU)); }