Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/xrpl/ledger/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/test/app/LoanBroker_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/xrpld/app/tx/detail/LoanBrokerCoverWithdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down