Fix bugs in excluding multiple zsweep zaddrs and report all excluded zsweep zaddrs in z_sweepstatus

This commit is contained in:
Duke Leto
2022-09-16 14:28:51 -04:00
parent 12fa3013ce
commit 35f376c8b5
2 changed files with 10 additions and 10 deletions

View File

@@ -3370,10 +3370,9 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk)
ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval));
ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress));
UniValue excludes(UniValue::VARR);
// BOOST_FOREACH(const std::string& exclude, pwalletMain->sweepExcludeAddresses ) {
// excludes.push_back(exclude);
// }
excludes.push_back( pwalletMain->sweepExcludeAddress );
BOOST_FOREACH(const std::string& exclude, pwalletMain->sweepExcludeAddresses ) {
excludes.push_back(exclude);
}
ret.push_back(Pair("zsweepexclude", excludes));
ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs));
ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee));