Support multiple zsweepexclude zaddrs
This commit is contained in:
@@ -2121,17 +2121,17 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
for (int i = 0; i < vSweepExclude.size(); i++) {
|
||||
LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]);
|
||||
pwalletMain->sweepExcludeAddress = vSweepExclude[i];
|
||||
auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]);
|
||||
if (!IsValidPaymentAddress(zSweepExcluded)) {
|
||||
return InitError("Invalid zsweep address");
|
||||
}
|
||||
auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweepExcluded);
|
||||
pwalletMain->sweepExcludeAddress = vSweepExclude[i];
|
||||
|
||||
if (!hasSpendingKey) {
|
||||
return InitError("Wallet must have the spending key of zsweepexclude address");
|
||||
}
|
||||
// Add this validated zaddr to the list of excluded sweep zaddrs
|
||||
pwalletMain->sweepExcludeAddresses.push_back( vSweepExclude[i] );
|
||||
}
|
||||
|
||||
if (pwalletMain->fSaplingConsolidationEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user