mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve handling of RPC ledger_index argument:
Some RPC commands return `ledger_index` as a quoted numeric string. This change allows the returned value to be directly copied and used for follow-on RPC commands. This commit fixes #3533
This commit is contained in:
committed by
Nik Bougalis
parent
707868be33
commit
801b1580f5
@@ -228,11 +228,18 @@ public:
|
||||
}
|
||||
{
|
||||
// Request an invalid ledger.
|
||||
Json::Value args{depositAuthArgs(alice, becky, "17")};
|
||||
Json::Value args{depositAuthArgs(alice, becky, "-1")};
|
||||
Json::Value const result{
|
||||
env.rpc("json", "deposit_authorized", args.toStyledString())};
|
||||
verifyErr(result, "invalidParams", "ledgerIndexMalformed");
|
||||
}
|
||||
{
|
||||
// Request a ledger that doesn't exist yet as a string.
|
||||
Json::Value args{depositAuthArgs(alice, becky, "17")};
|
||||
Json::Value const result{
|
||||
env.rpc("json", "deposit_authorized", args.toStyledString())};
|
||||
verifyErr(result, "lgrNotFound", "ledgerNotFound");
|
||||
}
|
||||
{
|
||||
// Request a ledger that doesn't exist yet.
|
||||
Json::Value args{depositAuthArgs(alice, becky)};
|
||||
|
||||
Reference in New Issue
Block a user