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,23 @@ class LedgerRPC_test : public beast::unit_test::suite
auto const ret = env.rpc("json", "ledger", "{ \"ledger_index\" : 1000000000000000 }");
checkErrorValue(ret, "invalidParams", "Invalid parameters.");
}
{
// test all boolean fields with non-boolean values
auto testBooleanField = [&](Json::StaticString const& field) {
Json::Value jvParams;
jvParams[field] = "blah";
auto const jrr = env.rpc("json", "ledger", to_string(jvParams))[jss::result];
checkErrorValue(jrr, "invalidParams", "Invalid parameters.");
};
testBooleanField(jss::full);
testBooleanField(jss::accounts);
testBooleanField(jss::transactions);
testBooleanField(jss::expand);
testBooleanField(jss::binary);
testBooleanField(jss::owner_funds);
testBooleanField(jss::queue);
}
}
void