Remove jss::account_index and jss::peer_index.

This commit is contained in:
Tom Ritchford
2015-06-26 18:11:32 -04:00
committed by Vinnie Falco
parent 1e7588d0ab
commit ea67a2d051
12 changed files with 33 additions and 130 deletions

View File

@@ -26,7 +26,6 @@ namespace ripple {
// {
// account: <account>|<account_public_key>
// account_index: <number> // optional, defaults to 0.
// ledger_hash : <ledger>
// ledger_index : <ledger_index>
// limit: integer // optional
@@ -44,15 +43,11 @@ Json::Value doAccountOffers (RPC::Context& context)
return result;
std::string strIdent (params[jss::account].asString ());
bool bIndex (params.isMember (jss::account_index));
int const iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
AccountID accountID;
Json::Value const jv = RPC::accountFromString (
accountID, bIndex, strIdent, iIndex, false);
if (jv)
if (auto jv = RPC::accountFromString (accountID, strIdent))
{
for (Json::Value::const_iterator it (jv.begin ()); it != jv.end (); ++it)
for (auto it = jv.begin (); it != jv.end (); ++it)
result[it.memberName ()] = it.key ();
return result;
@@ -61,9 +56,6 @@ Json::Value doAccountOffers (RPC::Context& context)
// Get info on account.
result[jss::account] = getApp().accountIDCache().toBase58 (accountID);
if (bIndex)
result[jss::account_index] = iIndex;
if (! ledger->exists(keylet::account (accountID)))
return rpcError (rpcACT_NOT_FOUND);