| 481 | } |
| 482 | |
| 483 | static UniValue getrawmempool(const JSONRPCRequest& request) |
| 484 | { |
| 485 | if (request.fHelp || request.params.size() > 1) |
| 486 | throw std::runtime_error( |
| 487 | "getrawmempool ( verbose )\n" |
| 488 | "\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n" |
| 489 | "\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n" |
| 490 | "\nArguments:\n" |
| 491 | "1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n" |
| 492 | "\nResult: (for verbose = false):\n" |
| 493 | "[ (json array of string)\n" |
| 494 | " \"transactionid\" (string) The transaction id\n" |
| 495 | " ,...\n" |
| 496 | "]\n" |
| 497 | "\nResult: (for verbose = true):\n" |
| 498 | "{ (json object)\n" |
| 499 | " \"transactionid\" : { (json object)\n" |
| 500 | + EntryDescriptionString() |
| 501 | + " }, ...\n" |
| 502 | "}\n" |
| 503 | "\nExamples:\n" |
| 504 | + HelpExampleCli("getrawmempool", "true") |
| 505 | + HelpExampleRpc("getrawmempool", "true") |
| 506 | ); |
| 507 | |
| 508 | bool fVerbose = false; |
| 509 | if (!request.params[0].isNull()) |
| 510 | fVerbose = request.params[0].get_bool(); |
| 511 | |
| 512 | return mempoolToJSON(fVerbose); |
| 513 | } |
| 514 | |
| 515 | static UniValue getmempoolancestors(const JSONRPCRequest& request) |
| 516 | { |
nothing calls this directly
no test coverage detected