From d50439cc4d02bf606d57fe8e6f215697f8b6112c Mon Sep 17 00:00:00 2001 From: David Schwartz Date: Tue, 5 Nov 2013 15:40:48 -0800 Subject: [PATCH] doAccountLines cleanup. --- src/ripple_app/rpc/RPCHandler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ripple_app/rpc/RPCHandler.cpp b/src/ripple_app/rpc/RPCHandler.cpp index 858a81b557..d27995374c 100644 --- a/src/ripple_app/rpc/RPCHandler.cpp +++ b/src/ripple_app/rpc/RPCHandler.cpp @@ -1116,10 +1116,13 @@ Json::Value RPCHandler::doAccountLines (Json::Value params, LoadType* loadType, if (lpLedger->hasAccount (raAccount)) { + AccountItems rippleLines (raAccount.getAccountID (), lpLedger, AccountItem::pointer (new RippleState ())); + if (!bUnlocked) + masterLockHolder.unlock (); + jvResult["account"] = raAccount.humanAccountID (); Json::Value& jsonLines = (jvResult["lines"] = Json::arrayValue); - AccountItems rippleLines (raAccount.getAccountID (), lpLedger, AccountItem::pointer (new RippleState ())); BOOST_FOREACH (AccountItem::ref item, rippleLines.getItems ()) { @@ -1153,8 +1156,6 @@ Json::Value RPCHandler::doAccountLines (Json::Value params, LoadType* loadType, } } - if (!bUnlocked) - masterLockHolder.unlock (); } else {