Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
RPCResult{"for verbose = false", | RPCResult{"for verbose = false", | ||||
RPCResult::Type::ARR, | RPCResult::Type::ARR, | ||||
"", | "", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::STR_HEX, "", "The transaction id"}, | {RPCResult::Type::STR_HEX, "", "The transaction id"}, | ||||
}}, | }}, | ||||
RPCResult{"for verbose = true", | RPCResult{"for verbose = true", | ||||
RPCResult::Type::OBJ, | RPCResult::Type::OBJ_DYN, | ||||
"", | "", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::OBJ_DYN, "transactionid", "", | {RPCResult::Type::OBJ, "transactionid", "", | ||||
MempoolEntryDescription()}, | MempoolEntryDescription()}, | ||||
}}, | }}, | ||||
}, | }, | ||||
RPCExamples{HelpExampleCli("getrawmempool", "true") + | RPCExamples{HelpExampleCli("getrawmempool", "true") + | ||||
HelpExampleRpc("getrawmempool", "true")}, | HelpExampleRpc("getrawmempool", "true")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
Show All 19 Lines | RPCHelpMan{ | ||||
{ | { | ||||
RPCResult{ | RPCResult{ | ||||
"for verbose = false", | "for verbose = false", | ||||
RPCResult::Type::ARR, | RPCResult::Type::ARR, | ||||
"", | "", | ||||
"", | "", | ||||
{{RPCResult::Type::STR_HEX, "", | {{RPCResult::Type::STR_HEX, "", | ||||
"The transaction id of an in-mempool ancestor transaction"}}}, | "The transaction id of an in-mempool ancestor transaction"}}}, | ||||
RPCResult{"for verbose = true", RPCResult::Type::OBJ_DYN, | RPCResult{"for verbose = true", RPCResult::Type::OBJ, | ||||
"transactionid", "", MempoolEntryDescription()}, | "transactionid", "", MempoolEntryDescription()}, | ||||
}, | }, | ||||
RPCExamples{HelpExampleCli("getmempoolancestors", "\"mytxid\"") + | RPCExamples{HelpExampleCli("getmempoolancestors", "\"mytxid\"") + | ||||
HelpExampleRpc("getmempoolancestors", "\"mytxid\"")}, | HelpExampleRpc("getmempoolancestors", "\"mytxid\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
bool fVerbose = false; | bool fVerbose = false; | ||||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
RPCResult{"for verbose = false", | RPCResult{"for verbose = false", | ||||
RPCResult::Type::ARR, | RPCResult::Type::ARR, | ||||
"", | "", | ||||
"", | "", | ||||
{{RPCResult::Type::STR_HEX, "", | {{RPCResult::Type::STR_HEX, "", | ||||
"The transaction id of an in-mempool descendant " | "The transaction id of an in-mempool descendant " | ||||
"transaction"}}}, | "transaction"}}}, | ||||
RPCResult{"for verbose = true", | RPCResult{"for verbose = true", | ||||
RPCResult::Type::OBJ, | RPCResult::Type::OBJ_DYN, | ||||
"", | "", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::OBJ_DYN, "transactionid", "", | {RPCResult::Type::OBJ, "transactionid", "", | ||||
MempoolEntryDescription()}, | MempoolEntryDescription()}, | ||||
}}, | }}, | ||||
}, | }, | ||||
RPCExamples{HelpExampleCli("getmempooldescendants", "\"mytxid\"") + | RPCExamples{HelpExampleCli("getmempooldescendants", "\"mytxid\"") + | ||||
HelpExampleRpc("getmempooldescendants", "\"mytxid\"")}, | HelpExampleRpc("getmempooldescendants", "\"mytxid\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | static UniValue getmempoolentry(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getmempoolentry", | "getmempoolentry", | ||||
"Returns mempool data for given transaction\n", | "Returns mempool data for given transaction\n", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"The transaction id (must be in mempool)"}, | "The transaction id (must be in mempool)"}, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::OBJ_DYN, "", "", MempoolEntryDescription()}, | RPCResult{RPCResult::Type::OBJ, "", "", MempoolEntryDescription()}, | ||||
RPCExamples{HelpExampleCli("getmempoolentry", "\"mytxid\"") + | RPCExamples{HelpExampleCli("getmempoolentry", "\"mytxid\"") + | ||||
HelpExampleRpc("getmempoolentry", "\"mytxid\"")}, | HelpExampleRpc("getmempoolentry", "\"mytxid\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
TxId txid(ParseHashV(request.params[0], "parameter 1")); | TxId txid(ParseHashV(request.params[0], "parameter 1")); | ||||
const CTxMemPool &mempool = EnsureMemPool(request.context); | const CTxMemPool &mempool = EnsureMemPool(request.context); | ||||
▲ Show 20 Lines • Show All 2,179 Lines • Show Last 20 Lines |