Merge AddSpendingKeyPaymentAddress into AddSpendingKey to simplify API
This commit is contained in:
parent
7c929cf5bc
commit
0bfdb9628e
|
@ -23,10 +23,6 @@ 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);
|
||||
|
@ -88,9 +84,9 @@ bool CBasicKeyStore::HaveWatchOnly() const
|
|||
return (!setWatchOnly.empty());
|
||||
}
|
||||
|
||||
bool CBasicKeyStore::AddSpendingKeyPaymentAddress(const libzcash::SpendingKey& key, const libzcash::PaymentAddress &address)
|
||||
bool CBasicKeyStore::AddSpendingKey(const libzcash::SpendingKey &sk)
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
mapSpendingKeys[address] = key;
|
||||
mapSpendingKeys[sk.address()] = sk;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -47,8 +47,7 @@ public:
|
|||
virtual bool HaveWatchOnly() const =0;
|
||||
|
||||
//! Add a spending key to the store.
|
||||
virtual bool AddSpendingKeyPaymentAddress(const libzcash::SpendingKey &key, const libzcash::PaymentAddress &address) =0;
|
||||
virtual bool AddSpendingKey(const libzcash::SpendingKey &key);
|
||||
virtual bool AddSpendingKey(const libzcash::SpendingKey &sk) =0;
|
||||
|
||||
//! Check whether a spending key corresponding to a given payment address is present in the store.
|
||||
virtual bool HaveSpendingKey(const libzcash::PaymentAddress &address) const =0;
|
||||
|
@ -116,7 +115,7 @@ public:
|
|||
virtual bool HaveWatchOnly(const CScript &dest) const;
|
||||
virtual bool HaveWatchOnly() const;
|
||||
|
||||
bool AddSpendingKeyPaymentAddress(const libzcash::SpendingKey &key, const libzcash::PaymentAddress &address);
|
||||
bool AddSpendingKey(const libzcash::SpendingKey &sk);
|
||||
bool HaveSpendingKey(const libzcash::PaymentAddress &address) const
|
||||
{
|
||||
bool result;
|
||||
|
|
Loading…
Reference in New Issue