From 4f0ab9c6090f407071a82c16f3bccdcaa48ff871 Mon Sep 17 00:00:00 2001 From: Shawn Xie Date: Fri, 18 Oct 2024 09:53:32 -0400 Subject: [PATCH 1/2] removed unused declarations --- src/xrpld/rpc/detail/MPTokenIssuanceID.cpp | 4 ++-- src/xrpld/rpc/detail/Tuning.h | 3 --- src/xrpld/rpc/handlers/Handlers.h | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp b/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp index 551f88deb55..721be652622 100644 --- a/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp +++ b/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2023 Ripple Labs Inc. + Copyright (c) 2024 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -75,7 +75,7 @@ insertMPTokenIssuanceID( return; std::optional result = getIDFromCreatedIssuance(transactionMeta); - if (result.has_value()) + if (result) response[jss::mpt_issuance_id] = to_string(result.value()); } diff --git a/src/xrpld/rpc/detail/Tuning.h b/src/xrpld/rpc/detail/Tuning.h index d4557a9fcfa..4f4a8be1bf7 100644 --- a/src/xrpld/rpc/detail/Tuning.h +++ b/src/xrpld/rpc/detail/Tuning.h @@ -57,9 +57,6 @@ static LimitRange constexpr accountNFTokens = {20, 100, 400}; /** Limits for the nft_buy_offers & nft_sell_offers commands. */ static LimitRange constexpr nftOffers = {50, 250, 500}; -/** Limits for the nft_buy_offers & nft_sell_offers commands. */ -static LimitRange constexpr mptHolders = {10, 200, 400}; - static int constexpr defaultAutoFillFeeMultiplier = 10; static int constexpr defaultAutoFillFeeDivisor = 1; static int constexpr maxPathfindsInProgress = 2; diff --git a/src/xrpld/rpc/handlers/Handlers.h b/src/xrpld/rpc/handlers/Handlers.h index b1f65cdea57..0085f51465a 100644 --- a/src/xrpld/rpc/handlers/Handlers.h +++ b/src/xrpld/rpc/handlers/Handlers.h @@ -51,8 +51,6 @@ doBlackList(RPC::JsonContext&); Json::Value doCanDelete(RPC::JsonContext&); Json::Value -doMPTHolders(RPC::JsonContext&); -Json::Value doChannelAuthorize(RPC::JsonContext&); Json::Value doChannelVerify(RPC::JsonContext&); From 78b19df80953a79ed806a7b210c746082caaad69 Mon Sep 17 00:00:00 2001 From: Shawn Xie Date: Fri, 18 Oct 2024 09:59:51 -0400 Subject: [PATCH 2/2] comments --- src/xrpld/rpc/MPTokenIssuanceID.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xrpld/rpc/MPTokenIssuanceID.h b/src/xrpld/rpc/MPTokenIssuanceID.h index f7f45fded3b..ef194bd398c 100644 --- a/src/xrpld/rpc/MPTokenIssuanceID.h +++ b/src/xrpld/rpc/MPTokenIssuanceID.h @@ -32,6 +32,14 @@ namespace ripple { namespace RPC { +/** + Add a `mpt_issuance_id` field to the `meta` input/output parameter. + The field is only added to successful MPTokenIssuanceCreate transactions. + The mpt_issuance_id is parsed from the sequence and the issuer in the + MPTokenIssuance object. + + @{ + */ bool canHaveMPTokenIssuanceID( std::shared_ptr const& serializedTx,