split off CBase58Data from CBitcoinAddress

Split off features unrelated to addresses from CBitcoinAddress to
CBase58Data, so they can be reused.
This commit is contained in:
Pieter Wuille
2011-07-11 11:09:00 +02:00
parent 2ffba736e9
commit cb61b8dc4c
2 changed files with 67 additions and 43 deletions

View File

@@ -1135,9 +1135,9 @@ bool ExtractAddress(const CScript& scriptPubKey, const CKeyStore* keystore, CBit
{
uint160 hash160;
if (item.first == OP_PUBKEY)
addressRet.SetAddress(item.second);
addressRet.SetPubKey(item.second);
else if (item.first == OP_PUBKEYHASH)
addressRet.SetAddress(uint160(item.second));
addressRet.SetHash160((uint160)item.second);
if (keystore == NULL || keystore->HaveKey(addressRet))
return true;
}