|
|
@ -103,12 +103,14 @@ bool AsyncRPCOperation_sweep::main_impl() { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
LogPrintf("%s: No zsweepaddress configured, exiting\n", opid); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (boost::get<libzcash::SaplingPaymentAddress>(&rpcSweepAddress) != nullptr) { |
|
|
|
sweepAddress = boost::get<libzcash::SaplingPaymentAddress>(rpcSweepAddress); |
|
|
|
} else { |
|
|
|
LogPrintf("%s: Invalid zsweepaddress, exiting\n", opid); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -195,9 +197,10 @@ bool AsyncRPCOperation_sweep::main_impl() { |
|
|
|
|
|
|
|
CAmount fee = fSweepTxFee; |
|
|
|
if (amountToSend <= fSweepTxFee) { |
|
|
|
fee = 0; |
|
|
|
LogPrintf("%s: Amount to send %s is <= fee, using fee=0", getId(), FormatMoney(amountToSend)); |
|
|
|
fee = 0; |
|
|
|
} |
|
|
|
amountSwept += amountToSend; |
|
|
|
|
|
|
|
auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); |
|
|
|
{ |
|
|
|
LOCK2(cs_main, pwalletMain->cs_wallet); |
|
|
@ -290,10 +293,9 @@ bool AsyncRPCOperation_sweep::main_impl() { |
|
|
|
pwalletMain->fSweepRunning = false; |
|
|
|
} |
|
|
|
|
|
|
|
LogPrintf("%s: Created %d transactions with total output amount=%s\n", getId(), numTxCreated, FormatMoney(amountSwept)); |
|
|
|
LogPrintf("%s: Created %d transactions with total output amount=%s, status=%d\n", getId(), numTxCreated, FormatMoney(amountSwept), (int)status); |
|
|
|
setSweepResult(numTxCreated, amountSwept, sweepTxIds); |
|
|
|
return true; |
|
|
|
|
|
|
|
return status; |
|
|
|
} |
|
|
|
|
|
|
|
void AsyncRPCOperation_sweep::setSweepResult(int numTxCreated, const CAmount& amountSwept, const std::vector<std::string>& sweepTxIds) { |
|
|
|