Rename ZTXOSelector::SpendingKeysAvailable -> RequireSpendingKeys

This commit is contained in:
Kris Nuttycombe 2022-01-25 07:39:22 -07:00
parent ddb34f612d
commit c15f6a9cad
3 changed files with 7 additions and 7 deletions

View File

@ -1684,7 +1684,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return InitError(_("-mineraddress is not a valid " PACKAGE_NAME " address."));
}
auto ztxoSelector = pwalletMain->ToZTXOSelector(zaddr.value(), true);
minerAddressInLocalWallet = ztxoSelector.has_value() && ztxoSelector.value().SpendingKeysAvailable();
minerAddressInLocalWallet = ztxoSelector.has_value();
}
if (GetBoolArg("-minetolocalwallet", true) && !minerAddressInLocalWallet) {
return InitError(_("-mineraddress is not in the local wallet. Either use a local address, or set -minetolocalwallet=0"));

View File

@ -58,7 +58,7 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
assert(fee_ >= 0);
assert(mindepth_ >= 0);
assert(!recipients_.empty());
assert(ztxoSelector.SpendingKeysAvailable());
assert(ztxoSelector.RequireSpendingKeys());
std::visit(match {
[&](const AccountZTXOPattern& acct) {

View File

@ -748,10 +748,10 @@ typedef std::variant<
class ZTXOSelector {
private:
ZTXOPattern pattern;
bool spendingKeysAvailable;
bool requireSpendingKeys;
ZTXOSelector(ZTXOPattern patternIn, bool spendingKeysAvailableIn):
pattern(patternIn), spendingKeysAvailable(spendingKeysAvailableIn) {}
ZTXOSelector(ZTXOPattern patternIn, bool requireSpendingKeysIn):
pattern(patternIn), requireSpendingKeys(requireSpendingKeysIn) {}
friend class CWallet;
public:
@ -759,8 +759,8 @@ public:
return pattern;
}
bool SpendingKeysAvailable() const {
return spendingKeysAvailable;
bool RequireSpendingKeys() const {
return requireSpendingKeys;
}
bool SelectsTransparent();