Mostly small cleanups and style fixes.

This commit is contained in:
JoelKatz
2011-12-13 18:04:43 -08:00
parent a93d125fce
commit 80a6f7e5ad
15 changed files with 60 additions and 62 deletions

View File

@@ -7,7 +7,7 @@
bool NewcoinAddress::SetHash160(const uint160& hash160)
{
SetData(theConfig.TEST_NET ? 112 : 1, &hash160, 20);
SetData(51, &hash160, 20);
return true;
}
@@ -18,21 +18,7 @@ bool NewcoinAddress::SetPubKey(const std::vector<unsigned char>& vchPubKey)
bool NewcoinAddress::IsValid()
{
int nExpectedSize = 20;
bool fExpectTestNet = false;
switch(nVersion)
{
case 1:
break;
case 112:
fExpectTestNet = true;
break;
default:
return false;
}
return fExpectTestNet == theConfig.TEST_NET && vchData.size() == nExpectedSize;
return nVersion == 51 && vchData.size() == 20;
}
NewcoinAddress::NewcoinAddress()