Primecoin: Address version change, addresses start with 'A'

master
Sunny King 2013-06-25 20:39:40 +01:00
parent 1122cfff32
commit 1fdd916f75
1 changed files with 5 additions and 5 deletions

View File

@ -272,8 +272,8 @@ class CBitcoinAddress : public CBase58Data
public:
enum
{
PUBKEY_ADDRESS = 0,
SCRIPT_ADDRESS = 5,
PUBKEY_ADDRESS = 23, // primecoin: pubkey address starts with 'A'
SCRIPT_ADDRESS = 83, // primecoin: script address starts with 'a'
PUBKEY_ADDRESS_TEST = 111,
SCRIPT_ADDRESS_TEST = 196,
};
@ -401,7 +401,7 @@ public:
void SetSecret(const CSecret& vchSecret, bool fCompressed)
{
assert(vchSecret.size() == 32);
SetData(fTestNet ? 239 : 128, &vchSecret[0], vchSecret.size());
SetData(128 + (fTestNet ? CBitcoinAddress::PUBKEY_ADDRESS_TEST : CBitcoinAddress::PUBKEY_ADDRESS), &vchSecret[0], vchSecret.size());
if (fCompressed)
vchData.push_back(1);
}
@ -420,10 +420,10 @@ public:
bool fExpectTestNet = false;
switch(nVersion)
{
case 128:
case (128 + CBitcoinAddress::PUBKEY_ADDRESS):
break;
case 239:
case (128 + CBitcoinAddress::PUBKEY_ADDRESS_TEST):
fExpectTestNet = true;
break;