Encapsulate public keys in CPubKey

This commit is contained in:
Pieter Wuille
2012-05-14 19:07:52 +02:00
parent f04017f702
commit fd61d6f506
16 changed files with 127 additions and 86 deletions

View File

@@ -275,9 +275,9 @@ public:
return true;
}
void SetPubKey(const std::vector<unsigned char>& vchPubKey)
void SetPubKey(const CPubKey& vchPubKey)
{
SetHash160(Hash160(vchPubKey));
SetHash160(vchPubKey.GetID());
}
bool SetScriptHash160(const uint160& hash160)
@@ -333,7 +333,7 @@ public:
SetHash160(hash160In);
}
CBitcoinAddress(const std::vector<unsigned char>& vchPubKey)
CBitcoinAddress(const CPubKey& vchPubKey)
{
SetPubKey(vchPubKey);
}