@@ -2205,7 +2205,7 @@ static RPCHelpMan scantxoutset()
2205
2205
result.pushKV (" unspents" , unspents);
2206
2206
result.pushKV (" total_amount" , ValueFromAmount (total_in));
2207
2207
} else {
2208
- throw JSONRPCError (RPC_INVALID_PARAMETER, " Invalid command " );
2208
+ throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf ( " Invalid action '%s' " , request. params [ 0 ]. get_str ()) );
2209
2209
}
2210
2210
return result;
2211
2211
},
@@ -2254,12 +2254,13 @@ static RPCHelpMan scanblocks()
2254
2254
},
2255
2255
{
2256
2256
scan_result_status_none,
2257
- RPCResult{" When action=='start'" , RPCResult::Type::OBJ, " " , " " , {
2257
+ RPCResult{" When action=='start'; only returns after scan completes " , RPCResult::Type::OBJ, " " , " " , {
2258
2258
{RPCResult::Type::NUM, " from_height" , " The height we started the scan from" },
2259
2259
{RPCResult::Type::NUM, " to_height" , " The height we ended the scan at" },
2260
- {RPCResult::Type::ARR, " relevant_blocks" , " " , {{RPCResult::Type::STR_HEX, " blockhash" , " A relevant blockhash" },}},
2261
- },
2262
- },
2260
+ {RPCResult::Type::ARR, " relevant_blocks" , " Blocks that may have matched a scanobject." , {
2261
+ {RPCResult::Type::STR_HEX, " blockhash" , " A relevant blockhash" },
2262
+ }},
2263
+ }},
2263
2264
RPCResult{" when action=='status' and a scan is currently in progress" , RPCResult::Type::OBJ, " " , " " , {
2264
2265
{RPCResult::Type::NUM, " progress" , " Approximate percent complete" },
2265
2266
{RPCResult::Type::NUM, " current_height" , " Height of the block currently being scanned" },
@@ -2402,7 +2403,7 @@ static RPCHelpMan scanblocks()
2402
2403
ret.pushKV (" relevant_blocks" , blocks);
2403
2404
}
2404
2405
else {
2405
- throw JSONRPCError (RPC_INVALID_PARAMETER, " Invalid command " );
2406
+ throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf ( " Invalid action '%s' " , request. params [ 0 ]. get_str ()) );
2406
2407
}
2407
2408
return ret;
2408
2409
},
0 commit comments