mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Compare commits
1 Commits
ximinez/le
...
a123456/di
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31b48e3b08 |
@@ -655,7 +655,7 @@ createPseudoAccount(
|
||||
uint256 const& pseudoOwnerKey,
|
||||
SField const& ownerField);
|
||||
|
||||
// Returns true iff sleAcct is a pseudo-account or specific
|
||||
// Returns true if sleAcct is a pseudo-account or specific
|
||||
// pseudo-accounts in pseudoFieldFilter.
|
||||
//
|
||||
// Returns false if sleAcct is
|
||||
|
||||
@@ -1024,6 +1024,12 @@ class LoanBroker_test : public beast::unit_test::suite
|
||||
destination(dest),
|
||||
ter(tecFROZEN),
|
||||
THISLINE);
|
||||
|
||||
// preclaim: tecPSEUDO_ACCOUNT
|
||||
env(coverWithdraw(alice, brokerKeylet.key, asset(10)),
|
||||
destination(vaultInfo.pseudoAccount),
|
||||
ter(tecPSEUDO_ACCOUNT),
|
||||
THISLINE);
|
||||
}
|
||||
|
||||
if (brokerTest == CoverClawback)
|
||||
|
||||
@@ -48,6 +48,11 @@ LoanBrokerCoverWithdraw::preclaim(PreclaimContext const& ctx)
|
||||
|
||||
auto const dstAcct = tx[~sfDestination].value_or(account);
|
||||
|
||||
if (isPseudoAccount(ctx.view, dstAcct))
|
||||
{
|
||||
JLOG(ctx.j.warn()) << "Trying to withdraw into a pseudo-account.";
|
||||
return tecPSEUDO_ACCOUNT;
|
||||
}
|
||||
auto const sleBroker = ctx.view.read(keylet::loanbroker(brokerID));
|
||||
if (!sleBroker)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user