Separate HaveKey function that checks whether a key is in a keystore
This commit is contained in:
@@ -195,3 +195,10 @@ CKeyID GetKeyForDestination(const CKeyStore& store, const CTxDestination& dest)
|
||||
}
|
||||
return CKeyID();
|
||||
}
|
||||
|
||||
bool HaveKey(const CKeyStore& store, const CKey& key)
|
||||
{
|
||||
CKey key2;
|
||||
key2.Set(key.begin(), key.end(), !key.IsCompressed());
|
||||
return store.HaveKey(key.GetPubKey().GetID()) || store.HaveKey(key2.GetPubKey().GetID());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user