mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Document 'tx' and 'ledger' commands.
This commit is contained in:
@@ -1376,7 +1376,7 @@ Json::Value RPCServer::doLedger(Json::Value& params)
|
|||||||
Ledger::pointer ledger;
|
Ledger::pointer ledger;
|
||||||
if (param == "current")
|
if (param == "current")
|
||||||
ledger = theApp->getMasterLedger().getCurrentLedger();
|
ledger = theApp->getMasterLedger().getCurrentLedger();
|
||||||
else if (param == "lastclosed")
|
else if ((param == "lastclosed") || (param == "lastaccepted"))
|
||||||
ledger = theApp->getMasterLedger().getClosedLedger();
|
ledger = theApp->getMasterLedger().getClosedLedger();
|
||||||
else if (param.size() > 12)
|
else if (param.size() > 12)
|
||||||
ledger = theApp->getMasterLedger().getLedgerByHash(uint256(param));
|
ledger = theApp->getMasterLedger().getLedgerByHash(uint256(param));
|
||||||
@@ -1386,13 +1386,7 @@ Json::Value RPCServer::doLedger(Json::Value& params)
|
|||||||
if (!ledger)
|
if (!ledger)
|
||||||
return RPCError(rpcLGR_NOT_FOUND);
|
return RPCError(rpcLGR_NOT_FOUND);
|
||||||
|
|
||||||
bool full = false;
|
bool full = extractString(param, params, 1) && (param == "full");
|
||||||
if (extractString(param, params, 1))
|
|
||||||
{
|
|
||||||
if (param == "full")
|
|
||||||
full = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Json::Value ret(Json::objectValue);
|
Json::Value ret(Json::objectValue);
|
||||||
ledger->addJson(ret, full ? LEDGER_JSON_FULL : 0);
|
ledger->addJson(ret, full ? LEDGER_JSON_FULL : 0);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ void printHelp(const po::options_description& desc)
|
|||||||
cout << " data_delete <key>" << endl;
|
cout << " data_delete <key>" << endl;
|
||||||
cout << " data_fetch <key>" << endl;
|
cout << " data_fetch <key>" << endl;
|
||||||
cout << " data_store <key> <value>" << endl;
|
cout << " data_store <key> <value>" << endl;
|
||||||
cout << " ledger" << endl;
|
cout << " ledger [<id>|current|lastclosed] [full]" << endl;
|
||||||
cout << " nickname_info <nickname>" << endl;
|
cout << " nickname_info <nickname>" << endl;
|
||||||
cout << " nickname_set <seed> <paying_account> <nickname> [<offer_minimum>] [<authorization>]" << endl;
|
cout << " nickname_set <seed> <paying_account> <nickname> [<offer_minimum>] [<authorization>]" << endl;
|
||||||
cout << " password_fund <seed> <paying_account> [<account>]" << endl;
|
cout << " password_fund <seed> <paying_account> [<account>]" << endl;
|
||||||
@@ -57,7 +57,7 @@ void printHelp(const po::options_description& desc)
|
|||||||
cout << " send <seed> <paying_account> <account_id> <amount> [<currency>] [<send_max>] [<send_currency>]" << endl;
|
cout << " send <seed> <paying_account> <account_id> <amount> [<currency>] [<send_max>] [<send_currency>]" << endl;
|
||||||
cout << " stop" << endl;
|
cout << " stop" << endl;
|
||||||
cout << " transit_set <seed> <paying_account> <transit_rate> <starts> <expires>" << endl;
|
cout << " transit_set <seed> <paying_account> <transit_rate> <starts> <expires>" << endl;
|
||||||
cout << " tx" << endl;
|
cout << " tx <id>" << endl;
|
||||||
cout << " unl_add <domain>|<public> [<comment>]" << endl;
|
cout << " unl_add <domain>|<public> [<comment>]" << endl;
|
||||||
cout << " unl_delete <public_key>" << endl;
|
cout << " unl_delete <public_key>" << endl;
|
||||||
cout << " unl_list" << endl;
|
cout << " unl_list" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user