diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 77c090d3a..f5809c58d 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -121,7 +121,7 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany( } // Lock UTXOs - //lock_utxos(); + lock_utxos(); // Lock shielded input notes lock_notes(); LogPrint("zrpc", "%s: z_sendmany input notes locked\n", getId()); @@ -192,7 +192,7 @@ void AsyncRPCOperation_sendmany::main() { } LogPrintf("%s",s); - //unlock_utxos(); // clean up + unlock_utxos(); // clean up unlock_notes(); // clean up LogPrint("zrpc", "%s: z_sendmany input notes unlocked\n", getId()); } @@ -792,13 +792,14 @@ UniValue AsyncRPCOperation_sendmany::getStatus() const { return obj; } -/* TODO: support locking taddr utxo inputs - // Lock input utxos void AsyncRPCOperation_sendmany::lock_utxos() { LOCK2(cs_main, pwalletMain->cs_wallet); for (auto utxo : t_inputs_) { - COutPoint outpt(utxo.txid, utxo.vout); + uint256 txid = std::get<0>(utxo); + int vout = std::get<1>(utxo); + + COutPoint outpt(txid, vout); pwalletMain->LockCoin(outpt); } } @@ -807,13 +808,14 @@ UniValue AsyncRPCOperation_sendmany::getStatus() const { void AsyncRPCOperation_sendmany::unlock_utxos() { LOCK2(cs_main, pwalletMain->cs_wallet); for (auto utxo : t_inputs_) { - COutPoint outpt(utxo.txid, utxo.vout); + uint256 txid = std::get<0>(utxo); + int vout = std::get<1>(utxo); + + COutPoint outpt(txid, vout); pwalletMain->UnlockCoin(outpt); } } -*/ - // Lock input notes void AsyncRPCOperation_sendmany::lock_notes() { LOCK2(cs_main, pwalletMain->cs_wallet);