Skip to content

Commit

Permalink
prefix Uint384 and Uint512 with Hash in server_definitions (XRPLF#5231)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 authored Jan 2, 2025
1 parent 679e35f commit 0324764
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/test/rpc/ServerInfo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/xrpld/rpc/handlers/ServerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0324764

Please sign in to comment.