Remove unused config param

This commit is contained in:
seelabs
2015-09-02 11:54:24 -04:00
committed by Scott Schurr
parent d8aab5a749
commit d015debe2b
12 changed files with 48 additions and 69 deletions

View File

@@ -65,13 +65,11 @@ isGlobalFrozen (ReadView const& view,
STAmount
accountHolds (ReadView const& view,
AccountID const& account, Currency const& currency,
AccountID const& issuer, FreezeHandling zeroIfFrozen,
Config const& config);
AccountID const& issuer, FreezeHandling zeroIfFrozen);
STAmount
accountFunds (ReadView const& view, AccountID const& id,
STAmount const& saDefault, FreezeHandling freezeHandling,
Config const& config);
STAmount const& saDefault, FreezeHandling freezeHandling);
/** Iterate all items in an account's owner directory. */
void

View File

@@ -100,8 +100,7 @@ isFrozen (ReadView const& view, AccountID const& account,
STAmount
accountHolds (ReadView const& view,
AccountID const& account, Currency const& currency,
AccountID const& issuer, FreezeHandling zeroIfFrozen,
Config const& config)
AccountID const& issuer, FreezeHandling zeroIfFrozen)
{
STAmount amount;
if (isXRP(currency))
@@ -159,8 +158,7 @@ accountHolds (ReadView const& view,
STAmount
accountFunds (ReadView const& view, AccountID const& id,
STAmount const& saDefault, FreezeHandling freezeHandling,
Config const& config)
STAmount const& saDefault, FreezeHandling freezeHandling)
{
STAmount saFunds;
@@ -177,7 +175,7 @@ accountFunds (ReadView const& view, AccountID const& id,
{
saFunds = accountHolds(view, id,
saDefault.getCurrency(), saDefault.getIssuer(),
freezeHandling, config);
freezeHandling);
WriteLog (lsTRACE, View) << "accountFunds:" <<
" account=" << to_string (id) <<
" saDefault=" << saDefault.getFullText () <<

View File

@@ -121,16 +121,16 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
av, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
av, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
accountSend (av, gw1, alice, toCredit);
expect (accountHolds (av, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount + toCredit);
accountSend (av, alice, gw1, toDebit);
expect (accountHolds (av, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount + toCredit - toDebit);
}
@@ -140,16 +140,16 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
av, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
av, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
rippleCredit (av, gw1, alice, toCredit, true);
expect (accountHolds (av, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount + toCredit);
rippleCredit (av, alice, gw1, toDebit, true);
expect (accountHolds (av, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount + toCredit - toDebit);
}
@@ -160,16 +160,16 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
accountSend (pv, gw1, alice, toCredit);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
accountSend (pv, alice, gw1, toDebit);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount - toDebit);
}
@@ -180,11 +180,11 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
rippleCredit (pv, gw1, alice, toCredit, true);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
}
@@ -195,11 +195,11 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
redeemIOU (pv, alice, toDebit, iss);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount - toDebit);
}
@@ -210,11 +210,11 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
issueIOU (pv, alice, toCredit, iss);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
}
@@ -225,27 +225,27 @@ class PaymentSandbox_test : public beast::unit_test::suite
auto const iss = USD_gw1.issue ();
auto const startingAmount = accountHolds (
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE, getConfig ());
pv, alice, iss.currency, iss.account, fhIGNORE_FREEZE);
accountSend (pv, gw1, alice, toCredit);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
{
PaymentSandbox pv2(&pv);
expect (accountHolds (pv2, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
accountSend (pv2, gw1, alice, toCredit);
expect (accountHolds (pv2, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount);
}
accountSend (pv, alice, gw1, toDebit);
expect (accountHolds (pv, alice, iss.currency, iss.account,
fhIGNORE_FREEZE, getConfig ()) ==
fhIGNORE_FREEZE) ==
startingAmount - toDebit);
}
}