Changeset View
Changeset View
Standalone View
Standalone View
src/keystore.cpp
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const { | ||||
LOCK(cs_KeyStore); | LOCK(cs_KeyStore); | ||||
return setWatchOnly.count(dest) > 0; | return setWatchOnly.count(dest) > 0; | ||||
} | } | ||||
bool CBasicKeyStore::HaveWatchOnly() const { | bool CBasicKeyStore::HaveWatchOnly() const { | ||||
LOCK(cs_KeyStore); | LOCK(cs_KeyStore); | ||||
return (!setWatchOnly.empty()); | return (!setWatchOnly.empty()); | ||||
} | } | ||||
CKeyID GetKeyForDestination(const CKeyStore &store, | |||||
const CTxDestination &dest) { | |||||
// Only supports destinations which map to single public keys, i.e. P2PKH. | |||||
if (auto id = boost::get<CKeyID>(&dest)) { | |||||
return *id; | |||||
} | |||||
return CKeyID(); | |||||
} |