| 493 | } |
| 494 | |
| 495 | static RPCHelpMan getdifficulty() |
| 496 | { |
| 497 | return RPCHelpMan{"getdifficulty", |
| 498 | "\nReturns the proof-of-work difficulty as a multiple of the minimum difficulty.\n", |
| 499 | {}, |
| 500 | RPCResult{ |
| 501 | RPCResult::Type::NUM, "", "the proof-of-work difficulty as a multiple of the minimum difficulty."}, |
| 502 | RPCExamples{ |
| 503 | HelpExampleCli("getdifficulty", "") |
| 504 | + HelpExampleRpc("getdifficulty", "") |
| 505 | }, |
| 506 | [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue |
| 507 | { |
| 508 | ChainstateManager& chainman = EnsureAnyChainman(request.context); |
| 509 | LOCK(cs_main); |
| 510 | return GetDifficulty(chainman.ActiveChain().Tip()); |
| 511 | }, |
| 512 | }; |
| 513 | } |
| 514 | |
| 515 | static std::vector<RPCResult> MempoolEntryDescription() { return { |
| 516 | RPCResult{RPCResult::Type::NUM, "vsize", "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."}, |
nothing calls this directly
no test coverage detected