Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 503 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
HelpExampleRpc("removeprunedfunds", | HelpExampleRpc("removeprunedfunds", | ||||
"\"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166" | "\"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166" | ||||
"eae7628734ea0a5\"")); | "eae7628734ea0a5\"")); | ||||
} | } | ||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
TxId txid; | TxId txid(ParseHashV(request.params[0], "txid")); | ||||
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) != DBErrors::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."); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,073 Lines • Show Last 20 Lines |