Remove obsolete hanko support from NewcoinAddress.

This commit is contained in:
Arthur Britto
2012-05-01 15:18:23 -07:00
parent 9ca903efae
commit f775bfd856
2 changed files with 0 additions and 79 deletions

View File

@@ -28,67 +28,6 @@ void NewcoinAddress::clear()
vchData.clear();
}
#if 0
//
// Hanko - OBSOLETE
//
uint160 NewcoinAddress::getHanko() const
{
switch (nVersion) {
case VER_NONE:
throw std::runtime_error("unset source");
case VER_HANKO:
return uint160(vchData);
case VER_NODE_PUBLIC:
// Note, we are encoding the left or right.
return Hash160(vchData);
default:
throw std::runtime_error(str(boost::format("bad source: %d") % int(nVersion)));
}
}
std::string NewcoinAddress::humanHanko() const
{
switch (nVersion) {
case VER_NONE:
throw std::runtime_error("unset source");
case VER_HANKO:
return ToString();
case VER_NODE_PUBLIC:
{
NewcoinAddress hanko;
(void) hanko.setHanko(getHanko());
return hanko.ToString();
}
default:
throw std::runtime_error(str(boost::format("bad source: %d") % int(nVersion)));
}
}
bool NewcoinAddress::setHanko(const std::string& strHanko)
{
return SetString(strHanko.c_str(), VER_HANKO);
}
void NewcoinAddress::setHanko(const uint160& hash160)
{
SetData(VER_HANKO, hash160.begin(), 20);
}
void NewcoinAddress::setHanko(const NewcoinAddress& nodePublic) {
setHanko(nodePublic.getHanko());
}
#endif
//
// NodePublic
//
@@ -99,9 +38,6 @@ const std::vector<unsigned char>& NewcoinAddress::getNodePublic() const
case VER_NONE:
throw std::runtime_error("unset source");
case VER_HANKO:
throw std::runtime_error("public not available from hanko");
case VER_NODE_PUBLIC:
return vchData;
@@ -116,9 +52,6 @@ std::string NewcoinAddress::humanNodePublic() const
case VER_NONE:
throw std::runtime_error("unset source");
case VER_HANKO:
throw std::runtime_error("public not available from hanko");
case VER_NODE_PUBLIC:
return ToString();

View File

@@ -12,7 +12,6 @@ class NewcoinAddress : public CBase58Data
private:
typedef enum {
VER_NONE = 1,
VER_HANKO = 8,
VER_NODE_PUBLIC = 28,
VER_NODE_PRIVATE = 32,
VER_ACCOUNT_ID = 0,
@@ -29,18 +28,7 @@ public:
bool isValid() const;
void clear();
#if 0
//
// hanko - OBSOLETE
//
uint160 getHanko() const;
std::string humanHanko() const;
bool setHanko(const std::string& strHanko);
void setHanko(const uint160& hash160);
void setHanko(const NewcoinAddress& nodePublic);
#endif
//
// Node Public
//