mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove unused parameters to accountFromString.
This commit is contained in:
committed by
Nik Bougalis
parent
f237187b0d
commit
c2814308f1
@@ -58,8 +58,8 @@ Json::Value doAccountCurrencies (RPC::Context& context)
|
|||||||
// Get info on account.
|
// Get info on account.
|
||||||
bool bIndex; // out param
|
bool bIndex; // out param
|
||||||
RippleAddress naAccount; // out param
|
RippleAddress naAccount; // out param
|
||||||
Json::Value jvAccepted (RPC::accountFromString (
|
Json::Value jvAccepted (
|
||||||
ledger, naAccount, bIndex, strIdent, iIndex, bStrict, context.netOps));
|
RPC::accountFromString (naAccount, bIndex, strIdent, iIndex, bStrict));
|
||||||
|
|
||||||
if (!jvAccepted.empty ())
|
if (!jvAccepted.empty ())
|
||||||
return jvAccepted;
|
return jvAccepted;
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ Json::Value doAccountInfo (RPC::Context& context)
|
|||||||
|
|
||||||
// Get info on account.
|
// Get info on account.
|
||||||
|
|
||||||
Json::Value jvAccepted = RPC::accountFromString (
|
auto jvAccepted = RPC::accountFromString (
|
||||||
ledger, naAccount, bIndex, strIdent, iIndex, bStrict, context.netOps);
|
naAccount, bIndex, strIdent, iIndex, bStrict);
|
||||||
|
|
||||||
if (!jvAccepted.empty ())
|
if (!jvAccepted.empty ())
|
||||||
return jvAccepted;
|
return jvAccepted;
|
||||||
|
|||||||
@@ -91,11 +91,11 @@ Json::Value doAccountLines (RPC::Context& context)
|
|||||||
int iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
int iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
||||||
RippleAddress rippleAddress;
|
RippleAddress rippleAddress;
|
||||||
|
|
||||||
Json::Value const jv (RPC::accountFromString (ledger, rippleAddress, bIndex,
|
auto jv = RPC::accountFromString (
|
||||||
strIdent, iIndex, false, context.netOps));
|
rippleAddress, bIndex, strIdent, iIndex, false);
|
||||||
if (! jv.empty ())
|
if (! jv.empty ())
|
||||||
{
|
{
|
||||||
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 ();
|
result[it.memberName ()] = it.key ();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -119,8 +119,8 @@ Json::Value doAccountLines (RPC::Context& context)
|
|||||||
if (bPeerIndex)
|
if (bPeerIndex)
|
||||||
result[jss::peer_index] = iPeerIndex;
|
result[jss::peer_index] = iPeerIndex;
|
||||||
|
|
||||||
result = RPC::accountFromString (ledger, rippleAddressPeer, bPeerIndex,
|
result = RPC::accountFromString (
|
||||||
strPeer, iPeerIndex, false, context.netOps);
|
rippleAddressPeer, bPeerIndex, strPeer, iPeerIndex, false);
|
||||||
|
|
||||||
if (! result.empty ())
|
if (! result.empty ())
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ Json::Value doAccountObjects (RPC::Context& context)
|
|||||||
auto const strIdent = params[jss::account].asString ();
|
auto const strIdent = params[jss::account].asString ();
|
||||||
auto iIndex = context.params.isMember (jss::account_index)
|
auto iIndex = context.params.isMember (jss::account_index)
|
||||||
? context.params[jss::account_index].asUInt () : 0;
|
? context.params[jss::account_index].asUInt () : 0;
|
||||||
auto jv = RPC::accountFromString (ledger, raAccount, bIndex,
|
auto jv = RPC::accountFromString (
|
||||||
strIdent, iIndex, false, context.netOps);
|
raAccount, bIndex, strIdent, iIndex, false);
|
||||||
if (! jv.empty ())
|
if (! jv.empty ())
|
||||||
{
|
{
|
||||||
for (auto it = jv.begin (); it != jv.end (); ++it)
|
for (auto it = jv.begin (); it != jv.end (); ++it)
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ Json::Value doAccountOffers (RPC::Context& context)
|
|||||||
int const iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
int const iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
||||||
RippleAddress rippleAddress;
|
RippleAddress rippleAddress;
|
||||||
|
|
||||||
Json::Value const jv (RPC::accountFromString (ledger, rippleAddress, bIndex,
|
Json::Value const jv = RPC::accountFromString (
|
||||||
strIdent, iIndex, false, context.netOps));
|
rippleAddress, bIndex, strIdent, iIndex, false);
|
||||||
if (! jv.empty ())
|
if (! jv.empty ())
|
||||||
{
|
{
|
||||||
for (Json::Value::const_iterator it (jv.begin ()); it != jv.end (); ++it)
|
for (Json::Value::const_iterator it (jv.begin ()); it != jv.end (); ++it)
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ Json::Value doNoRippleCheck (RPC::Context& context)
|
|||||||
int iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
int iIndex (bIndex ? params[jss::account_index].asUInt () : 0);
|
||||||
RippleAddress rippleAddress;
|
RippleAddress rippleAddress;
|
||||||
|
|
||||||
Json::Value const jv (RPC::accountFromString (ledger, rippleAddress, bIndex,
|
Json::Value const jv = RPC::accountFromString (
|
||||||
strIdent, iIndex, false, context.netOps));
|
rippleAddress, bIndex, strIdent, iIndex, false);
|
||||||
if (! jv.empty ())
|
if (! jv.empty ())
|
||||||
{
|
{
|
||||||
for (Json::Value::const_iterator it (jv.begin ()); it != jv.end (); ++it)
|
for (Json::Value::const_iterator it (jv.begin ()); it != jv.end (); ++it)
|
||||||
|
|||||||
@@ -46,26 +46,22 @@ Json::Value doOwnerInfo (RPC::Context& context)
|
|||||||
|
|
||||||
auto const& closedLedger = context.netOps.getClosedLedger ();
|
auto const& closedLedger = context.netOps.getClosedLedger ();
|
||||||
Json::Value jAccepted = RPC::accountFromString (
|
Json::Value jAccepted = RPC::accountFromString (
|
||||||
closedLedger,
|
|
||||||
raAccount,
|
raAccount,
|
||||||
bIndex,
|
bIndex,
|
||||||
strIdent,
|
strIdent,
|
||||||
iIndex,
|
iIndex,
|
||||||
false,
|
false);
|
||||||
context.netOps);
|
|
||||||
|
|
||||||
ret[jss::accepted] = jAccepted.empty () ? context.netOps.getOwnerInfo (
|
ret[jss::accepted] = jAccepted.empty () ? context.netOps.getOwnerInfo (
|
||||||
closedLedger, raAccount) : jAccepted;
|
closedLedger, raAccount) : jAccepted;
|
||||||
|
|
||||||
auto const& currentLedger = context.netOps.getCurrentLedger ();
|
auto const& currentLedger = context.netOps.getCurrentLedger ();
|
||||||
Json::Value jCurrent = RPC::accountFromString (
|
Json::Value jCurrent = RPC::accountFromString (
|
||||||
currentLedger,
|
|
||||||
raAccount,
|
raAccount,
|
||||||
bIndex,
|
bIndex,
|
||||||
strIdent,
|
strIdent,
|
||||||
iIndex,
|
iIndex,
|
||||||
false,
|
false);
|
||||||
context.netOps);
|
|
||||||
|
|
||||||
ret[jss::current] = jCurrent.empty () ? context.netOps.getOwnerInfo (
|
ret[jss::current] = jCurrent.empty () ? context.netOps.getOwnerInfo (
|
||||||
currentLedger, raAccount) : jCurrent;
|
currentLedger, raAccount) : jCurrent;
|
||||||
|
|||||||
@@ -29,13 +29,11 @@ namespace RPC {
|
|||||||
//
|
//
|
||||||
// Returns a Json::objectValue, containing error information if there was one.
|
// Returns a Json::objectValue, containing error information if there was one.
|
||||||
Json::Value accountFromString (
|
Json::Value accountFromString (
|
||||||
Ledger::ref lrLedger,
|
|
||||||
RippleAddress& naAccount,
|
RippleAddress& naAccount,
|
||||||
bool& bIndex,
|
bool& bIndex,
|
||||||
std::string const& strIdent,
|
std::string const& strIdent,
|
||||||
int const iIndex,
|
int const iIndex,
|
||||||
bool const bStrict,
|
bool const bStrict)
|
||||||
NetworkOPs& netOps)
|
|
||||||
{
|
{
|
||||||
RippleAddress naSeed;
|
RippleAddress naSeed;
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,11 @@ namespace ripple {
|
|||||||
namespace RPC {
|
namespace RPC {
|
||||||
|
|
||||||
Json::Value accountFromString (
|
Json::Value accountFromString (
|
||||||
Ledger::ref lrLedger,
|
|
||||||
RippleAddress& naAccount,
|
RippleAddress& naAccount,
|
||||||
bool& bIndex,
|
bool& bIndex,
|
||||||
std::string const& strIdent,
|
std::string const& strIdent,
|
||||||
const int iIndex,
|
int iIndex,
|
||||||
const bool bStrict,
|
bool bStrict);
|
||||||
NetworkOPs& netOps);
|
|
||||||
|
|
||||||
} // RPC
|
} // RPC
|
||||||
} // ripple
|
} // ripple
|
||||||
|
|||||||
Reference in New Issue
Block a user