| 249 | } |
| 250 | |
| 251 | CTxDestination CBitcoinAddress::Get() const |
| 252 | { |
| 253 | if (!IsValid()) |
| 254 | return CNoDestination(); |
| 255 | uint160 id; |
| 256 | memcpy(&id, &vchData[0], 20); |
| 257 | if (vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS)) |
| 258 | return CKeyID(id); |
| 259 | else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) |
| 260 | return CScriptID(id); |
| 261 | else |
| 262 | return CNoDestination(); |
| 263 | } |
| 264 | |
| 265 | bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const |
| 266 | { |
no test coverage detected