Cleanup, debug, extra JSON info.

This commit is contained in:
JoelKatz
2012-01-17 20:39:41 -08:00
parent 93c7333c58
commit f1052e0706
2 changed files with 47 additions and 5 deletions

View File

@@ -100,7 +100,13 @@ void LocalAccountFamily::lock()
CKey::pointer LocalAccountFamily::getPrivateKey(int seq)
{
if(!mRootPrivateKey) return CKey::pointer();
if(!mRootPrivateKey)
{
#ifdef DEBUG
std::cerr << "Cannot get private key from loced family" << std::endl;
#endif
return CKey::pointer();
}
return CKey::pointer(new CKey(mFamily, mRootPrivateKey, seq));
}
@@ -383,6 +389,13 @@ Json::Value LocalAccount::getJson() const
ret["FullName"]=getFullName();
ret["Issued"]=Json::Value(isIssued());
ret["IsLocked"]=mFamily->isLocked();
uint64 eb=getBalance();
if(eb!=0) ret["Balance"]=boost::lexical_cast<std::string>(eb);
uint32 sq=getAcctSeq();
if(sq!=0) ret["TxnSeq"]=boost::lexical_cast<std::string>(sq);
return ret;
}