From 132ec743e19037ae7688b17ff1163297114fdf96 Mon Sep 17 00:00:00 2001 From: cyan317 <120398799+cindyyan317@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:19:42 +0100 Subject: [PATCH] Add support for ltNEGATIVE_UNL (#1474) Fixed #1369 --- src/util/LedgerUtils.cpp | 1 + tests/unit/util/LedgerUtilsTests.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/LedgerUtils.cpp b/src/util/LedgerUtils.cpp index cf888dc5..1c7564aa 100644 --- a/src/util/LedgerUtils.cpp +++ b/src/util/LedgerUtils.cpp @@ -68,6 +68,7 @@ static std::unordered_map const LEDGER_TYPES_ LedgerTypeAttributes(ripple::ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID, true)}, {JS(did), LedgerTypeAttributes(ripple::ltDID)}, {JS(oracle), LedgerTypeAttributes(ripple::ltORACLE)}, + {JS(nunl), LedgerTypeAttributes(ripple::ltNEGATIVE_UNL)}, }}; } // namespace impl diff --git a/tests/unit/util/LedgerUtilsTests.cpp b/tests/unit/util/LedgerUtilsTests.cpp index 001107d4..3c580a57 100644 --- a/tests/unit/util/LedgerUtilsTests.cpp +++ b/tests/unit/util/LedgerUtilsTests.cpp @@ -51,7 +51,8 @@ TEST(LedgerUtilsTests, LedgerObjectTypeList) JS(xchain_owned_claim_id), JS(xchain_owned_create_account_claim_id), JS(did), - JS(oracle) + JS(oracle), + JS(nunl) }; ASSERT_TRUE(std::size(typesList) == types.size()); EXPECT_TRUE(std::all_of(std::cbegin(typesList), std::cend(typesList), [&types](auto const& type) {