Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion src/rpc/handlers/LedgerEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,13 @@ tag_invoke(boost::json::value_to_tag<LedgerEntryHandler::Input>, boost::json::va
{JS(mptoken), ripple::ltMPTOKEN},
{JS(permissioned_domain), ripple::ltPERMISSIONED_DOMAIN},
{JS(vault), ripple::ltVAULT},
{JS(delegate), ripple::ltDELEGATE}
{JS(delegate), ripple::ltDELEGATE},
{JS(amendments), ripple::ltAMENDMENTS},
{JS(fee), ripple::ltFEE_SETTINGS},
{JS(hashes), ripple::ltLEDGER_HASHES},
{JS(nft_offer), ripple::ltNFTOKEN_OFFER},
{JS(nunl), ripple::ltNEGATIVE_UNL},
{JS(signer_list), ripple::ltSIGNER_LIST}
};

auto const parseBridgeFromJson = [](boost::json::value const& bridgeJson) {
Expand Down
6 changes: 6 additions & 0 deletions src/rpc/handlers/LedgerEntry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ class LedgerEntryHandler {
validation::CustomValidators::accountBase58Validator, Status(ClioError::RpcMalformedAddress)
}}
}}},
{JS(amendments), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(fee), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(hashes), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(nft_offer), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(nunl), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(signer_list), kMALFORMED_REQUEST_HEX_STRING_VALIDATOR},
{JS(ledger), check::Deprecated{}},
{"include_deleted", validation::Type<bool>{}},
};
Expand Down
16 changes: 14 additions & 2 deletions tests/unit/rpc/handlers/LedgerEntryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2311,11 +2311,23 @@ struct IndexTest : public HandlerBaseTest, public WithParamInterface<std::string
};
};

// content of index, payment_channel, nft_page and check fields is ledger index.
// content of index, amendments, check, fee, hashes, nft_offer, nunl, nft_page, payment_channel, signer_list fields is
// ledger index.
INSTANTIATE_TEST_CASE_P(
RPCLedgerEntryGroup3,
IndexTest,
Values("index", "nft_page", "payment_channel", "check"),
Values(
"index",
"amendments",
"check",
"fee",
"hashes",
"nft_offer",
"nunl",
"nft_page",
"payment_channel",
"signer_list"
),
IndexTest::NameGenerator{}
);

Expand Down