MCPcopy Create free account
hub / github.com/ElementsProject/elements / getpakinfo

Function getpakinfo

src/rpc/misc.cpp:913–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911}
912
913static RPCHelpMan getpakinfo()
914{
915 return RPCHelpMan{"getpakinfo",
916 "\nReturns relevant pegout authorization key (PAK) information about this node, both from blockchain data.\n",
917 {},
918 RPCResult{
919 RPCResult::Type::OBJ, "", "",
920 {
921 {RPCResult::Type::ARR, "block_paklist", "The PAK list loaded from latest epoch",
922 {
923 {RPCResult::Type::ELISION, "", ""}
924 }},
925 }
926 },
927 RPCExamples{""},
928 [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
929{
930 LOCK(cs_main);
931
932 UniValue ret(UniValue::VOBJ);
933 ChainstateManager& chainman = EnsureAnyChainman(request.context);
934 CPAKList paklist = GetActivePAKList(chainman.ActiveChain().Tip(), Params().GetConsensus());
935 ret.pushKV("block_paklist", FormatPAKList(paklist));
936
937 return ret;
938},
939 };
940}
941
942static RPCHelpMan calcfastmerkleroot()
943{

Callers

nothing calls this directly

Calls 5

GetActivePAKListFunction · 0.85
FormatPAKListFunction · 0.85
ParamsClass · 0.50
TipMethod · 0.45
pushKVMethod · 0.45

Tested by

no test coverage detected