Skip to content
Open
Changes from all commits
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
7 changes: 4 additions & 3 deletions src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TER
PermissionedDomainDelete::preclaim(PreclaimContext const& ctx)
{
auto const domain = ctx.tx.getFieldH256(sfDomainID);
auto const sleDomain = ctx.view.read({ltPERMISSIONED_DOMAIN, domain});
auto const sleDomain = ctx.view.read(keylet::permissionedDomain(domain));

if (!sleDomain)
return tecNO_ENTRY;
Expand All @@ -42,7 +42,7 @@ PermissionedDomainDelete::doApply()
"ripple::PermissionedDomainDelete::doApply : required field present");

auto const slePd =
view().peek({ltPERMISSIONED_DOMAIN, ctx_.tx.at(sfDomainID)});
view().peek(keylet::permissionedDomain(ctx_.tx.at(sfDomainID)));
auto const page = (*slePd)[sfOwnerNode];

if (!view().dirRemove(keylet::ownerDir(account_), page, slePd->key(), true))
Expand All @@ -54,7 +54,8 @@ PermissionedDomainDelete::doApply()
// LCOV_EXCL_STOP
}

auto const ownerSle = view().peek(keylet::account(account_));
auto const owner = (*slePd)[sfOwner];
auto const ownerSle = view().peek(keylet::account(owner));
Comment on lines -57 to +58
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change here? They are already checked that they are the same in preclaim

Copy link
Member Author

@tequdev tequdev Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it is more intuitive.
Future readers of this code will no longer need to check preclaim.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to split it into another PR?

XRPL_ASSERT(
ownerSle && ownerSle->getFieldU32(sfOwnerCount) > 0,
"ripple::PermissionedDomainDelete::doApply : nonzero owner count");
Expand Down