From 0324764a834e22af43a9b77dea229a7d53bb0406 Mon Sep 17 00:00:00 2001 From: Shawn Xie <35279399+shawnxie999@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:32:15 -0500 Subject: [PATCH] prefix Uint384 and Uint512 with Hash in server_definitions (#5231) --- src/test/rpc/ServerInfo_test.cpp | 2 ++ src/xrpld/rpc/handlers/ServerInfo.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/rpc/ServerInfo_test.cpp b/src/test/rpc/ServerInfo_test.cpp index e6f889c5bdf..5821ddb59c9 100644 --- a/src/test/rpc/ServerInfo_test.cpp +++ b/src/test/rpc/ServerInfo_test.cpp @@ -227,6 +227,8 @@ admin = 127.0.0.1 BEAST_EXPECT(types["Hash160"].asUInt() == 17); BEAST_EXPECT(types["Hash192"].asUInt() == 21); BEAST_EXPECT(types["Hash256"].asUInt() == 5); + BEAST_EXPECT(types["Hash384"].asUInt() == 22); + BEAST_EXPECT(types["Hash512"].asUInt() == 23); } } diff --git a/src/xrpld/rpc/handlers/ServerInfo.cpp b/src/xrpld/rpc/handlers/ServerInfo.cpp index ea631491c65..1cb90c0b9db 100644 --- a/src/xrpld/rpc/handlers/ServerInfo.cpp +++ b/src/xrpld/rpc/handlers/ServerInfo.cpp @@ -80,8 +80,8 @@ ServerDefinitions::translate(std::string const& inp) if (contains("UINT")) { - if (contains("256") || contains("192") || contains("160") || - contains("128")) + if (contains("512") || contains("384") || contains("256") || + contains("192") || contains("160") || contains("128")) return replace("UINT", "Hash"); else return replace("UINT", "UInt");