mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 01:06:48 +00:00
remove unused insSponsorCoSigning args
This commit is contained in:
@@ -926,7 +926,6 @@ trustCreate(
|
||||
std::uint32_t uSrcQualityIn,
|
||||
std::uint32_t uSrcQualityOut,
|
||||
std::optional<AccountID> const& sponsorAccountID,
|
||||
bool const isSponsorCoSigning,
|
||||
beast::Journal j);
|
||||
|
||||
[[nodiscard]] TER
|
||||
@@ -1029,7 +1028,6 @@ accountSend(
|
||||
STAmount const& saAmount,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAcc = std::nullopt,
|
||||
bool isSponsorCoSigning = false,
|
||||
WaiveTransferFee waiveFee = WaiveTransferFee::No);
|
||||
|
||||
using MultiplePaymentDestinations = std::vector<std::pair<AccountID, Number>>;
|
||||
@@ -1047,7 +1045,6 @@ accountSendMulti(
|
||||
MultiplePaymentDestinations const& receivers,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee = WaiveTransferFee::No);
|
||||
|
||||
[[nodiscard]] TER
|
||||
|
||||
@@ -1681,7 +1681,6 @@ doWithdraw(
|
||||
}
|
||||
|
||||
auto const sponsorAcc = getTxReserveSponsorAccountID(tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(tx);
|
||||
|
||||
// Move the funds directly from the broker's pseudo-account to the
|
||||
// dstAcct
|
||||
@@ -1692,7 +1691,6 @@ doWithdraw(
|
||||
amount,
|
||||
j,
|
||||
sponsorAcc,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes);
|
||||
}
|
||||
|
||||
@@ -1730,7 +1728,6 @@ addEmptyHolding(
|
||||
auto const& sponsorAccountID = !isPseudoAccount(sleDst)
|
||||
? getTxReserveSponsorAccountID(tx)
|
||||
: std::nullopt;
|
||||
auto const isSponsorCoSigning = tx.isFieldPresent(sfSponsorSignature);
|
||||
|
||||
// Can the account cover the trust line reserve ?
|
||||
if (auto const ret = checkInsufficientReserve(
|
||||
@@ -1761,7 +1758,6 @@ addEmptyHolding(
|
||||
/*qualityIn=*/0,
|
||||
/*qualityOut=*/0,
|
||||
sponsorAccountID,
|
||||
isSponsorCoSigning,
|
||||
journal);
|
||||
}
|
||||
|
||||
@@ -1938,7 +1934,6 @@ trustCreate(
|
||||
std::uint32_t uQualityIn,
|
||||
std::uint32_t uQualityOut,
|
||||
std::optional<AccountID> const& sponsorAccountID,
|
||||
bool const isSponsorCoSigning,
|
||||
beast::Journal j)
|
||||
{
|
||||
JLOG(j.trace()) << "trustCreate: " << to_string(uSrcAccountID) << ", "
|
||||
@@ -2274,7 +2269,6 @@ rippleCreditIOU(
|
||||
STAmount const& saAmount,
|
||||
bool bCheckIssuer,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
beast::Journal j)
|
||||
{
|
||||
AccountID const& issuer = saAmount.getIssuer();
|
||||
@@ -2429,7 +2423,6 @@ rippleCreditIOU(
|
||||
0,
|
||||
0,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j);
|
||||
}
|
||||
|
||||
@@ -2445,7 +2438,6 @@ rippleSendIOU(
|
||||
STAmount& saActual,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
auto const& issuer = saAmount.getIssuer();
|
||||
@@ -2461,14 +2453,7 @@ rippleSendIOU(
|
||||
{
|
||||
// Direct send: redeeming IOUs and/or sending own IOUs.
|
||||
auto const ter = rippleCreditIOU(
|
||||
view,
|
||||
uSenderID,
|
||||
uReceiverID,
|
||||
saAmount,
|
||||
false,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j);
|
||||
view, uSenderID, uReceiverID, saAmount, false, sponsorAccount, j);
|
||||
if (ter != tesSUCCESS)
|
||||
return ter;
|
||||
saActual = saAmount;
|
||||
@@ -2489,25 +2474,11 @@ rippleSendIOU(
|
||||
<< " cost=" << saActual.getFullText();
|
||||
|
||||
TER terResult = rippleCreditIOU(
|
||||
view,
|
||||
issuer,
|
||||
uReceiverID,
|
||||
saAmount,
|
||||
true,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j);
|
||||
view, issuer, uReceiverID, saAmount, true, sponsorAccount, j);
|
||||
|
||||
if (tesSUCCESS == terResult)
|
||||
terResult = rippleCreditIOU(
|
||||
view,
|
||||
uSenderID,
|
||||
issuer,
|
||||
saActual,
|
||||
true,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j);
|
||||
view, uSenderID, issuer, saActual, true, sponsorAccount, j);
|
||||
|
||||
return terResult;
|
||||
}
|
||||
@@ -2524,7 +2495,6 @@ rippleSendMultiIOU(
|
||||
STAmount& actual,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
auto const& issuer = issue.getIssuer();
|
||||
@@ -2562,7 +2532,6 @@ rippleSendMultiIOU(
|
||||
amount,
|
||||
false,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j))
|
||||
return ter;
|
||||
actual += amount;
|
||||
@@ -2588,14 +2557,7 @@ rippleSendMultiIOU(
|
||||
<< " cost=" << actual.getFullText();
|
||||
|
||||
if (TER const terResult = rippleCreditIOU(
|
||||
view,
|
||||
issuer,
|
||||
receiverID,
|
||||
amount,
|
||||
true,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j))
|
||||
view, issuer, receiverID, amount, true, sponsorAccount, j))
|
||||
return terResult;
|
||||
}
|
||||
|
||||
@@ -2608,7 +2570,6 @@ rippleSendMultiIOU(
|
||||
takeFromSender,
|
||||
true,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
j))
|
||||
return terResult;
|
||||
}
|
||||
@@ -2624,7 +2585,6 @@ accountSendIOU(
|
||||
STAmount const& saAmount,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
if (view.rules().enabled(fixAMMv1_1))
|
||||
@@ -2665,7 +2625,6 @@ accountSendIOU(
|
||||
saActual,
|
||||
j,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
waiveFee);
|
||||
}
|
||||
|
||||
@@ -2758,7 +2717,6 @@ accountSendMultiIOU(
|
||||
MultiplePaymentDestinations const& receivers,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
XRPL_ASSERT_PARTS(
|
||||
@@ -2780,7 +2738,6 @@ accountSendMultiIOU(
|
||||
actual,
|
||||
j,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
waiveFee);
|
||||
}
|
||||
|
||||
@@ -3170,7 +3127,6 @@ accountSend(
|
||||
STAmount const& saAmount,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAcc,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
return std::visit(
|
||||
@@ -3183,7 +3139,6 @@ accountSend(
|
||||
saAmount,
|
||||
j,
|
||||
sponsorAcc,
|
||||
isSponsorCoSigning,
|
||||
waiveFee);
|
||||
else
|
||||
return accountSendMPT(
|
||||
@@ -3200,7 +3155,6 @@ accountSendMulti(
|
||||
MultiplePaymentDestinations const& receivers,
|
||||
beast::Journal j,
|
||||
std::optional<AccountID> const& sponsorAccount,
|
||||
bool isSponsorCoSigning,
|
||||
WaiveTransferFee waiveFee)
|
||||
{
|
||||
XRPL_ASSERT_PARTS(
|
||||
@@ -3217,7 +3171,6 @@ accountSendMulti(
|
||||
receivers,
|
||||
j,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
waiveFee);
|
||||
else
|
||||
return accountSendMultiMPT(
|
||||
@@ -3384,7 +3337,6 @@ issueIOU(
|
||||
0,
|
||||
0,
|
||||
std::nullopt,
|
||||
false,
|
||||
j);
|
||||
}
|
||||
|
||||
@@ -3951,7 +3903,6 @@ rippleCredit(
|
||||
saAmount,
|
||||
bCheckIssuer,
|
||||
std::nullopt,
|
||||
false,
|
||||
j);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -104,10 +104,7 @@ public:
|
||||
send(Args&&... args)
|
||||
{
|
||||
return accountSend(
|
||||
std::forward<Args>(args)...,
|
||||
std::nullopt,
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
std::forward<Args>(args)..., std::nullopt, WaiveTransferFee::Yes);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -262,15 +262,8 @@ applyCreate(
|
||||
|
||||
// Send LPT to LP.
|
||||
auto const sponsor = getTxReserveSponsorAccountID(ctx_.tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(ctx_.tx);
|
||||
auto res = accountSend(
|
||||
sb,
|
||||
accountId,
|
||||
account_,
|
||||
lpTokens,
|
||||
ctx_.journal,
|
||||
sponsor,
|
||||
isSponsorCoSigning);
|
||||
auto res =
|
||||
accountSend(sb, accountId, account_, lpTokens, ctx_.journal, sponsor);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
JLOG(j_.debug()) << "AMM Instance: failed to send LPT " << lpTokens;
|
||||
@@ -285,7 +278,6 @@ applyCreate(
|
||||
amount,
|
||||
ctx_.journal,
|
||||
std::nullopt, // don't sponsor for AMM Trustline
|
||||
false,
|
||||
WaiveTransferFee::Yes))
|
||||
return res;
|
||||
// Set AMM flag on AMM trustline
|
||||
|
||||
@@ -510,7 +510,6 @@ AMMDeposit::deposit(
|
||||
std::uint16_t tfee)
|
||||
{
|
||||
auto const sponsor = getTxReserveSponsorAccountID(ctx_.tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(ctx_.tx);
|
||||
|
||||
// Check account has sufficient funds.
|
||||
// Return true if it does, false otherwise.
|
||||
@@ -585,7 +584,6 @@ AMMDeposit::deposit(
|
||||
amountDepositActual,
|
||||
ctx_.journal,
|
||||
std::nullopt, // don't sponsor for AMM Trustline
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
@@ -613,7 +611,6 @@ AMMDeposit::deposit(
|
||||
*amount2DepositActual,
|
||||
ctx_.journal,
|
||||
std::nullopt, // don't sponsor for AMM Trustline
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
@@ -630,8 +627,7 @@ AMMDeposit::deposit(
|
||||
account_,
|
||||
lpTokensDepositActual,
|
||||
ctx_.journal,
|
||||
sponsor,
|
||||
isSponsorCoSigning);
|
||||
sponsor);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
JLOG(ctx_.journal.debug()) << "AMM Deposit: failed to deposit LPTokens";
|
||||
|
||||
@@ -610,8 +610,6 @@ AMMWithdraw::withdraw(
|
||||
if (auto const err = sufficientReserve(amountWithdrawActual.issue()))
|
||||
return {err, STAmount{}, STAmount{}, STAmount{}};
|
||||
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(tx);
|
||||
|
||||
// Withdraw amountWithdraw
|
||||
auto res = accountSend(
|
||||
view,
|
||||
@@ -620,7 +618,6 @@ AMMWithdraw::withdraw(
|
||||
amountWithdrawActual,
|
||||
journal,
|
||||
sponsor,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
@@ -645,7 +642,6 @@ AMMWithdraw::withdraw(
|
||||
*amount2WithdrawActual,
|
||||
journal,
|
||||
sponsor,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes);
|
||||
if (res != tesSUCCESS)
|
||||
{
|
||||
|
||||
@@ -348,9 +348,6 @@ CashCheck::doApply()
|
||||
STAmount initialBalance(flowDeliver.issue());
|
||||
initialBalance.setIssuer(noAccount());
|
||||
|
||||
auto const isSponsorCoSigning =
|
||||
isSponsorReserveCoSigning(ctx_.tx);
|
||||
|
||||
// clang-format off
|
||||
if (TER const ter = trustCreate(
|
||||
psb, // payment sandbox
|
||||
@@ -368,7 +365,6 @@ CashCheck::doApply()
|
||||
0, // quality in
|
||||
0, // quality out
|
||||
sponsorAcc, // sponsor
|
||||
isSponsorCoSigning, // is sponsor co-signing
|
||||
viewJ); // journal
|
||||
!isTesSuccess(ter))
|
||||
{
|
||||
|
||||
@@ -797,8 +797,6 @@ escrowUnlockApplyHelper<Issue>(
|
||||
STAmount initialBalance(amount.issue());
|
||||
initialBalance.setIssuer(noAccount());
|
||||
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(tx);
|
||||
|
||||
// clang-format off
|
||||
if (TER const ter = trustCreate(
|
||||
view, // payment sandbox
|
||||
@@ -816,7 +814,6 @@ escrowUnlockApplyHelper<Issue>(
|
||||
0, // quality in
|
||||
0, // quality out
|
||||
sponeorAcc, // sponsor
|
||||
isSponsorCoSigning, // is sponsor co-signing
|
||||
journal); // journal
|
||||
!isTesSuccess(ter))
|
||||
{
|
||||
|
||||
@@ -338,7 +338,6 @@ LoanBrokerCoverClawback::doApply()
|
||||
clawAmount,
|
||||
j_,
|
||||
{},
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@ LoanBrokerCoverDeposit::doApply()
|
||||
amount,
|
||||
j_,
|
||||
{},
|
||||
false,
|
||||
WaiveTransferFee::Yes))
|
||||
return ter;
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ LoanBrokerDelete::doApply()
|
||||
coverAvailable,
|
||||
j_,
|
||||
{},
|
||||
false,
|
||||
WaiveTransferFee::Yes))
|
||||
return ter;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,6 @@ LoanManage::defaultLoan(
|
||||
STAmount{vaultAsset, defaultCovered},
|
||||
j,
|
||||
{},
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
}
|
||||
|
||||
|
||||
@@ -521,7 +521,6 @@ LoanPay::doApply()
|
||||
}
|
||||
|
||||
auto const sponsorAccount = getTxReserveSponsorAccountID(tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(tx);
|
||||
|
||||
if (auto const ter = accountSendMulti(
|
||||
view,
|
||||
@@ -531,7 +530,6 @@ LoanPay::doApply()
|
||||
{brokerPayee, totalPaidToBroker}},
|
||||
j_,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes))
|
||||
return ter;
|
||||
|
||||
|
||||
@@ -545,7 +545,6 @@ LoanSet::doApply()
|
||||
}
|
||||
|
||||
auto const sponsorAccount = getTxReserveSponsorAccountID(tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(tx);
|
||||
|
||||
if (auto const ter = accountSendMulti(
|
||||
view,
|
||||
@@ -554,7 +553,6 @@ LoanSet::doApply()
|
||||
{{borrower, loanAssetsToBorrower}, {brokerOwner, originationFee}},
|
||||
j_,
|
||||
sponsorAccount,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes))
|
||||
return ter;
|
||||
|
||||
|
||||
@@ -722,8 +722,6 @@ SetTrust::doApply()
|
||||
JLOG(j_.trace()) << "doTrustSet: Creating ripple line: "
|
||||
<< to_string(k.key);
|
||||
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(ctx_.tx);
|
||||
|
||||
// Create a new ripple line.
|
||||
terResult = trustCreate(
|
||||
view(),
|
||||
@@ -741,7 +739,6 @@ SetTrust::doApply()
|
||||
uQualityIn,
|
||||
uQualityOut,
|
||||
txSponsorAcc,
|
||||
isSponsorCoSigning,
|
||||
viewJ);
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,6 @@ VaultClawback::doApply()
|
||||
sharesDestroyed,
|
||||
j_,
|
||||
std::nullopt,
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
!isTesSuccess(ter))
|
||||
return ter;
|
||||
@@ -292,7 +291,6 @@ VaultClawback::doApply()
|
||||
assetsRecovered,
|
||||
j_,
|
||||
std::nullopt,
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
!isTesSuccess(ter))
|
||||
return ter;
|
||||
|
||||
@@ -262,7 +262,6 @@ VaultDeposit::doApply()
|
||||
assetsDeposited,
|
||||
j_,
|
||||
std::nullopt,
|
||||
false,
|
||||
WaiveTransferFee::Yes);
|
||||
!isTesSuccess(ter))
|
||||
return ter;
|
||||
@@ -283,7 +282,6 @@ VaultDeposit::doApply()
|
||||
}
|
||||
|
||||
auto const sponsor = getTxReserveSponsorAccountID(ctx_.tx);
|
||||
auto const isSponsorCoSigning = ctx_.tx.isFieldPresent(sfSponsorSignature);
|
||||
|
||||
// Transfer shares from vault to depositor.
|
||||
if (auto const ter = accountSend(
|
||||
@@ -293,7 +291,6 @@ VaultDeposit::doApply()
|
||||
sharesCreated,
|
||||
j_,
|
||||
sponsor,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes);
|
||||
!isTesSuccess(ter))
|
||||
return ter;
|
||||
|
||||
@@ -199,7 +199,6 @@ VaultWithdraw::doApply()
|
||||
|
||||
auto const& vaultAccount = vault->at(sfAccount);
|
||||
auto const sponsor = getTxReserveSponsorAccountID(ctx_.tx);
|
||||
auto const isSponsorCoSigning = isSponsorReserveCoSigning(ctx_.tx);
|
||||
|
||||
// Transfer shares from depositor to vault.
|
||||
if (auto const ter = accountSend(
|
||||
@@ -209,7 +208,6 @@ VaultWithdraw::doApply()
|
||||
sharesRedeemed,
|
||||
j_,
|
||||
sponsor,
|
||||
isSponsorCoSigning,
|
||||
WaiveTransferFee::Yes);
|
||||
!isTesSuccess(ter))
|
||||
return ter;
|
||||
|
||||
Reference in New Issue
Block a user