Skip to content

Commit

Permalink
Fix ledger_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
oleks-rip committed Nov 21, 2024
1 parent cf6281b commit 38f9a60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// If you add an amendment here, then do not forget to increment `numFeatures`
// in include/xrpl/protocol/Feature.h.

XRPL_FEATURE(PermissionedDomains, Supported::no, VoteBehavior::DefaultNo)
XRPL_FEATURE(Credentials, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(AMMClawback, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (AMMv1_2, Supported::yes, VoteBehavior::DefaultNo)
Expand Down Expand Up @@ -98,8 +99,6 @@ XRPL_FIX (1513, Supported::yes, VoteBehavior::DefaultYe
XRPL_FEATURE(FlowCross, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(OwnerPaysFee, Supported::no, VoteBehavior::DefaultNo)
XRPL_FEATURE(PermissionedDomains, Supported::no, VoteBehavior::DefaultNo)


// The following amendments are obsolete, but must remain supported
// because they could potentially get enabled.
Expand Down
6 changes: 6 additions & 0 deletions src/xrpld/rpc/handlers/LedgerEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ doLedgerEntry(RPC::JsonContext& context)
}
else if (context.params.isMember(jss::permissioned_domain))
{
expectedType = ltPERMISSIONED_DOMAIN;
uNodeIndex = beast::zero;
auto const& pd = context.params[jss::permissioned_domain];
if (pd.isString())
Expand All @@ -822,6 +823,7 @@ doLedgerEntry(RPC::JsonContext& context)
else if (
!pd.isObject() || !pd.isMember(jss::account) ||
!pd[jss::account].isString() || !pd.isMember(jss::seq) ||
(pd[jss::seq].isInt() && pd[jss::seq].asInt() < 0) ||
(!pd[jss::seq].isInt() && !pd[jss::seq].isUInt()))
{
jvResult[jss::error] = "malformedRequest";
Expand Down Expand Up @@ -905,6 +907,10 @@ doLedgerEntry(RPC::JsonContext& context)
jvResult[jss::index] = to_string(uNodeIndex);
}
}
else
{
jvResult[jss::error] = "malformedRequest";
}

return jvResult;
}
Expand Down

0 comments on commit 38f9a60

Please sign in to comment.