fix: Make assorted RPC fixes (#6529)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Mayukha Vadari
2026-04-29 14:05:34 -04:00
committed by GitHub
parent f7275b7ad9
commit 7be98d95de
17 changed files with 328 additions and 71 deletions

View File

@@ -165,6 +165,16 @@ public:
BEAST_EXPECT(jrr[jss::status] == "error");
BEAST_EXPECT(jrr[jss::error_message] == "ledgerNotFound");
}
{
// binary not a boolean
Json::Value jvParams;
jvParams[jss::binary] = "true";
auto const jrr = env.rpc("json", "ledger_data", to_string(jvParams))[jss::result];
BEAST_EXPECT(jrr[jss::error] == "invalidParams");
BEAST_EXPECT(jrr[jss::status] == "error");
BEAST_EXPECT(jrr[jss::error_message] == "Invalid field 'binary', not boolean.");
}
}
void