From 4eec81b1916302a895ed32aef93b9915f742b1cb Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 27 Aug 2022 13:57:00 -0400 Subject: [PATCH] Fix some issues in z_sweepstatus --- src/wallet/rpcwallet.cpp | 3 +-- src/wallet/wallet.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index e596ed03f..c977e2764 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3334,10 +3334,9 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) LOCK2(cs_main, pwalletMain->cs_wallet); UniValue ret(UniValue::VOBJ); - auto amount_swept; ret.push_back(Pair("zsweep", pwalletMain->fSweepEnabled)); ret.push_back(Pair("running", pwalletMain->fSweepRunning)); - ret.push_back(Pair("amount_swept", amount_swept)); + ret.push_back(Pair("amount_swept", pwalletMain->amountSwept)); if (pwalletMain->fConsolidationRunning) { ret.push_back(Pair("next_zsweep", pwalletMain->sweepInterval + chainActive.Tip()->GetHeight())); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ada169c73..4ae4716cb 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -808,7 +808,9 @@ public: bool fSweepExternalEnabled = false; bool fSweepRunning = false; int nextSweep = 0; + int amountSwept = 0; int sweepInterval = 20; + int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = "";