File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,16 @@ bool CBasicKeyStore::GetSaplingIncomingViewingKey(const libzcash::SaplingPayment
233233 return false ;
234234}
235235
236+ bool CBasicKeyStore::GetSaplingExtendedSpendingKey (const libzcash::SaplingPaymentAddress &addr,
237+ libzcash::SaplingExtendedSpendingKey &extskOut) const {
238+ libzcash::SaplingIncomingViewingKey ivk;
239+ libzcash::SaplingFullViewingKey fvk;
240+
241+ return GetSaplingIncomingViewingKey (addr, ivk) &&
242+ GetSaplingFullViewingKey (ivk, fvk) &&
243+ GetSaplingSpendingKey (fvk, extskOut);
244+ }
245+
236246void CBasicKeyStore::GetSaplingPaymentAddresses (std::set<libzcash::SaplingPaymentAddress> &setAddress) const
237247{
238248 setAddress.clear ();
Original file line number Diff line number Diff line change @@ -138,6 +138,11 @@ class CBasicKeyStore : public CKeyStore
138138 virtual bool GetSaplingIncomingViewingKey (
139139 const libzcash::SaplingPaymentAddress &addr,
140140 libzcash::SaplingIncomingViewingKey& ivkOut) const ;
141+
142+ bool GetSaplingExtendedSpendingKey (
143+ const libzcash::SaplingPaymentAddress &addr,
144+ libzcash::SaplingExtendedSpendingKey &extskOut) const ;
145+
141146 void GetSaplingPaymentAddresses (std::set<libzcash::SaplingPaymentAddress> &setAddress) const ;
142147};
143148
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ bool CCryptoKeyStore::AddSaplingSpendingKey(
1919 const libzcash::SaplingPaymentAddress &defaultAddr)
2020{
2121 {
22- LOCK (cs_SpendingKeyStore);
22+ LOCK2 (cs_SpendingKeyStore, cs_KeyStore );
2323 if (!IsCrypted ()) {
2424 return CBasicKeyStore::AddSaplingSpendingKey (sk, defaultAddr);
2525 }
You can’t perform that action at this time.
0 commit comments