Add support for spending keys to the basic key store
This commit is contained in:
@@ -23,6 +23,10 @@ bool CKeyStore::AddKey(const CKey &key) {
|
||||
return AddKeyPubKey(key, key.GetPubKey());
|
||||
}
|
||||
|
||||
bool CKeyStore::AddSpendingKey(const libzcash::SpendingKey &key) {
|
||||
return AddSpendingKeyPaymentAddress(key, key.address());
|
||||
}
|
||||
|
||||
bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey)
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
@@ -83,3 +87,10 @@ bool CBasicKeyStore::HaveWatchOnly() const
|
||||
LOCK(cs_KeyStore);
|
||||
return (!setWatchOnly.empty());
|
||||
}
|
||||
|
||||
bool CBasicKeyStore::AddSpendingKeyPaymentAddress(const libzcash::SpendingKey& key, const libzcash::PaymentAddress &address)
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
mapSpendingKeys[address] = key;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user