Skip to content

Commit

Permalink
Remove unused GetKeyID and IsScript methods from CBitcoinAddress
Browse files Browse the repository at this point in the history
Coming from btc@8d0041e607a0e5bff52152f3d8af504f3703baa7
  • Loading branch information
furszy committed Jun 29, 2020
1 parent e7c5d9a commit 7d3ba5d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/base58.cpp
Expand Up @@ -252,8 +252,6 @@ class CBitcoinAddress : public CBase58Data
CBitcoinAddress(const char* pszAddress) { SetString(pszAddress); }

CTxDestination Get() const;
bool GetKeyID(CKeyID& keyID) const;
bool IsScript() const;
bool IsStakingAddress() const;


Expand Down Expand Up @@ -332,24 +330,6 @@ CTxDestination CBitcoinAddress::Get() const
return CNoDestination();
}

bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const
{
if (!IsValid() ||
(vchVersion != Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS) &&
vchVersion != Params().Base58Prefix(CChainParams::STAKING_ADDRESS)))
return false;
uint160 id;
memcpy(&id, &vchData[0], 20);
keyID = CKeyID(id);
return true;
}

bool CBitcoinAddress::IsScript() const
{
bool fCorrectSize = vchData.size() == 20;
return fCorrectSize && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
}

bool CBitcoinAddress::IsStakingAddress() const
{
bool fCorrectSize = vchData.size() == 20;
Expand Down

0 comments on commit 7d3ba5d

Please sign in to comment.