Recognize ripplerpc 2.0 requests and respond in kind:

* Force jtx to request/receive the 2.0 API
* Force the JSON and WebSocket tests to use 2.0 API
*  This specifically allows the Websocket to create 2.0 json/ripple
   and get back a 2.0 response.
* Add test for malformed json2
* Add check for parse failure
* Add check for params to be in array form.
* Correct type-o discovered in tests due to stricter checking.
* Add API version to the WSClient & JSONRPCClient test
* Update source.dox with more headers
This commit is contained in:
Howard Hinnant
2016-10-25 16:08:48 -04:00
committed by Nik Bougalis
parent cdf470e68d
commit 2fd0540ed4
20 changed files with 1178 additions and 62 deletions

View File

@@ -1744,6 +1744,12 @@ public:
auto jrr = wsc->invoke("submit", payment);
BEAST_EXPECT(jrr[jss::status] == "success");
BEAST_EXPECT(jrr[jss::result][jss::engine_result] == "tesSUCCESS");
if (wsc->version() == 2)
{
BEAST_EXPECT(jrr.isMember(jss::jsonrpc) && jrr[jss::jsonrpc] == "2.0");
BEAST_EXPECT(jrr.isMember(jss::ripplerpc) && jrr[jss::ripplerpc] == "2.0");
BEAST_EXPECT(jrr.isMember(jss::id) && jrr[jss::id] == 5);
}
jrr = ledgerEntryState (env, alice, gw, "XTS");
BEAST_EXPECT(jrr[jss::node][sfBalance.fieldName][jss::value] == "-101");