Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 2,247 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 4) { | ||||
" \"label\" : \"label\" (string) A comment for the " | " \"label\" : \"label\" (string) A comment for the " | ||||
"address/transaction, if any\n" | "address/transaction, if any\n" | ||||
" \"to\": \"...\", (string) If a comment to is " | " \"to\": \"...\", (string) If a comment to is " | ||||
"associated with the transaction.\n" | "associated with the transaction.\n" | ||||
" ],\n" | " ],\n" | ||||
" \"removed\": [\n" | " \"removed\": [\n" | ||||
" <structure is the same as \"transactions\" above, only " | " <structure is the same as \"transactions\" above, only " | ||||
"present if include_removed=true>\n" | "present if include_removed=true>\n" | ||||
" Note: transactions that were readded in the active chain will " | " Note: transactions that were re-added in the active chain " | ||||
"appear as-is in this array, and may thus have a positive " | "will appear as-is in this array, and may thus have a positive " | ||||
"confirmation count.\n" | "confirmation count.\n" | ||||
" ],\n" | " ],\n" | ||||
" \"lastblock\": \"lastblockhash\" (string) The hash of the " | " \"lastblock\": \"lastblockhash\" (string) The hash of the " | ||||
"block (target_confirmations-1) from the best block on the main " | "block (target_confirmations-1) from the best block on the main " | ||||
"chain. This is typically used to feed back into listsinceblock " | "chain. This is typically used to feed back into listsinceblock " | ||||
"the next time you call it. So you would generally use a " | "the next time you call it. So you would generally use a " | ||||
"target_confirmations of say 6, so you will be continually " | "target_confirmations of say 6, so you will be continually " | ||||
"re-notified of transactions until they've reached 6 confirmations " | "re-notified of transactions until they've reached 6 confirmations " | ||||
▲ Show 20 Lines • Show All 1,749 Lines • ▼ Show 20 Lines | CBlockIndex *pChainTip = nullptr; | ||||
if (!request.params[1].isNull()) { | if (!request.params[1].isNull()) { | ||||
pindexStop = chainActive[request.params[1].get_int()]; | pindexStop = chainActive[request.params[1].get_int()]; | ||||
if (!pindexStop) { | if (!pindexStop) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | throw JSONRPCError(RPC_INVALID_PARAMETER, | ||||
"Invalid stop_height"); | "Invalid stop_height"); | ||||
} else if (pindexStop->nHeight < pindexStart->nHeight) { | } else if (pindexStop->nHeight < pindexStart->nHeight) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_INVALID_PARAMETER, | RPC_INVALID_PARAMETER, | ||||
"stop_height must be greater then start_height"); | "stop_height must be greater than start_height"); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// We can't rescan beyond non-pruned blocks, stop and throw an error | // We can't rescan beyond non-pruned blocks, stop and throw an error | ||||
if (fPruneMode) { | if (fPruneMode) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
CBlockIndex *block = pindexStop ? pindexStop : pChainTip; | CBlockIndex *block = pindexStop ? pindexStop : pChainTip; | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |