Misc fixes.

This commit is contained in:
Arthur Britto
2012-07-14 12:53:07 -07:00
parent 520a8039b4
commit f6fcef9101
7 changed files with 184 additions and 173 deletions

View File

@@ -139,7 +139,7 @@ std::string NewcoinAddress::humanNodePublic() const
bool NewcoinAddress::setNodePublic(const std::string& strPublic)
{
return SetString(strPublic.c_str(), VER_NODE_PUBLIC);
return SetString(strPublic.c_str(), VER_NODE_PUBLIC);
}
void NewcoinAddress::setNodePublic(const std::vector<unsigned char>& vPublic)
@@ -302,7 +302,16 @@ std::string NewcoinAddress::humanAccountID() const
bool NewcoinAddress::setAccountID(const std::string& strAccountID)
{
return SetString(strAccountID.c_str(), VER_ACCOUNT_ID);
if (strAccountID.empty())
{
setAccountID(uint160());
return true;
}
else
{
return SetString(strAccountID.c_str(), VER_ACCOUNT_ID);
}
}
void NewcoinAddress::setAccountID(const uint160& hash160)