| 377 | } |
| 378 | |
| 379 | CTxDestination CBitcoinAddress::Get() const |
| 380 | { |
| 381 | if (!IsValid()) |
| 382 | return CNoDestination(); |
| 383 | uint160 id; |
| 384 | memcpy(static_cast<void*>(&id), &vchData[0], 20); |
| 385 | if (vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS)) |
| 386 | return CKeyID(id); |
| 387 | else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) |
| 388 | return CScriptID(id); |
| 389 | else |
| 390 | return CNoDestination(); |
| 391 | } |
| 392 | |
| 393 | bool CBitcoinAddress::GetIndexKey(uint160& hashBytes, int& type) const |
| 394 | { |
no test coverage detected