Introduce CWallet::HaveOrchardSpendingKeyForAddress.
This commit is contained in:
parent
9e80e4aff6
commit
8a7283ca83
|
@ -6716,7 +6716,7 @@ bool CWallet::HasSpendingKeys(const NoteFilter& addrSet) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& addr : addrSet.GetOrchardAddresses()) {
|
for (const auto& addr : addrSet.GetOrchardAddresses()) {
|
||||||
if (!orchardWallet.GetSpendingKeyForAddress(addr).has_value()) {
|
if (!HaveOrchardSpendingKeyForAddress(addr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6724,6 +6724,10 @@ bool CWallet::HasSpendingKeys(const NoteFilter& addrSet) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CWallet::HaveOrchardSpendingKeyForAddress(
|
||||||
|
const OrchardRawAddress &addr) const {
|
||||||
|
return orchardWallet.GetSpendingKeyForAddress(addr).has_value();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find notes in the wallet filtered by payment addresses, min depth, max depth,
|
* Find notes in the wallet filtered by payment addresses, min depth, max depth,
|
||||||
|
|
|
@ -1957,6 +1957,8 @@ public:
|
||||||
*/
|
*/
|
||||||
bool HasSpendingKeys(const NoteFilter& noteFilter) const;
|
bool HasSpendingKeys(const NoteFilter& noteFilter) const;
|
||||||
|
|
||||||
|
bool HaveOrchardSpendingKeyForAddress(const libzcash::OrchardRawAddress &addr) const;
|
||||||
|
|
||||||
/* Find notes filtered by payment addresses, min depth, max depth, if they are spent,
|
/* Find notes filtered by payment addresses, min depth, max depth, if they are spent,
|
||||||
if a spending key is required, and if they are locked */
|
if a spending key is required, and if they are locked */
|
||||||
void GetFilteredNotes(std::vector<SproutNoteEntry>& sproutEntriesRet,
|
void GetFilteredNotes(std::vector<SproutNoteEntry>& sproutEntriesRet,
|
||||||
|
|
Loading…
Reference in New Issue