Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("removprunedfunds", "\"a8d0c0184dde994a09ec054286f1c" | HelpExampleRpc("removprunedfunds", "\"a8d0c0184dde994a09ec054286f1c" | ||||
"e581bebf46446a512166eae7628734e" | "e581bebf46446a512166eae7628734e" | ||||
"a0a5\"")); | "a0a5\"")); | ||||
} | } | ||||
LOCK2(cs_main, pwalletMain->cs_wallet); | LOCK2(cs_main, pwalletMain->cs_wallet); | ||||
uint256 hash; | TxHash hash; | ||||
hash.SetHex(request.params[0].get_str()); | hash.SetHex(request.params[0].get_str()); | ||||
std::vector<uint256> vHash; | std::vector<TxHash> vHash; | ||||
vHash.push_back(hash); | vHash.push_back(hash); | ||||
std::vector<uint256> vHashOut; | std::vector<TxHash> vHashOut; | ||||
if (pwalletMain->ZapSelectTx(vHash, vHashOut) != DB_LOAD_OK) { | if (pwalletMain->ZapSelectTx(vHash, vHashOut) != DB_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 (vHashOut.empty()) { | if (vHashOut.empty()) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | throw JSONRPCError(RPC_INVALID_PARAMETER, | ||||
▲ Show 20 Lines • Show All 869 Lines • Show Last 20 Lines |