mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +00:00
Helper functions.
This commit is contained in:
17
Wallet.cpp
17
Wallet.cpp
@@ -294,6 +294,23 @@ CKey::pointer LocalAccount::getPrivateKey()
|
||||
return la->getPrivKey();
|
||||
}
|
||||
|
||||
void Wallet::getFamilies(std::vector<uint160>& familyIDs)
|
||||
{
|
||||
familyIDs.reserve(families.size());
|
||||
for(std::map<uint160, LocalAccountFamily::pointer>::iterator fit=families.begin(); fit!=families.end(); ++fit)
|
||||
familyIDs.push_back(fit->first);
|
||||
}
|
||||
|
||||
bool Wallet::getFamilyInfo(const uint160& family, std::string& name, std::string& comment)
|
||||
{
|
||||
std::map<uint160, LocalAccountFamily::pointer>::iterator fit=families.find(family);
|
||||
if(fit==families.end()) return false;
|
||||
assert(fit->second->getFamily()==family);
|
||||
name=fit->second->getShortName();
|
||||
comment=fit->second->getComment();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Wallet::load()
|
||||
{
|
||||
std::string sql("SELECT * FROM LocalAcctFamilies");
|
||||
|
||||
Reference in New Issue
Block a user