Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 430 Lines • ▼ Show 20 Lines | UniValue removeprunedfunds(const Config &config, | ||||
LOCK2(cs_main, pwallet->cs_wallet); | LOCK2(cs_main, pwallet->cs_wallet); | ||||
TxId txid; | TxId txid; | ||||
txid.SetHex(request.params[0].get_str()); | txid.SetHex(request.params[0].get_str()); | ||||
std::vector<TxId> txIds; | std::vector<TxId> txIds; | ||||
txIds.push_back(txid); | txIds.push_back(txid); | ||||
std::vector<TxId> txIdsOut; | std::vector<TxId> txIdsOut; | ||||
if (pwallet->ZapSelectTx(txIds, txIdsOut) != DB_LOAD_OK) { | if (pwallet->ZapSelectTx(txIds, txIdsOut) != DBErrors::LOAD_OK) { | ||||
throw JSONRPCError(RPC_WALLET_ERROR, | throw JSONRPCError(RPC_WALLET_ERROR, | ||||
"Could not properly delete the transaction."); | "Could not properly delete the transaction."); | ||||
} | } | ||||
if (txIdsOut.empty()) { | if (txIdsOut.empty()) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | throw JSONRPCError(RPC_INVALID_PARAMETER, | ||||
"Transaction does not exist in wallet."); | "Transaction does not exist in wallet."); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 985 Lines • Show Last 20 Lines |