Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | static UniValue getdifficulty(const Config &config, | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
return GetDifficulty(chainActive.Tip()); | return GetDifficulty(chainActive.Tip()); | ||||
} | } | ||||
static std::string EntryDescriptionString() { | static std::string EntryDescriptionString() { | ||||
return " \"size\" : n, (numeric) transaction size.\n" | return " \"size\" : n, (numeric) transaction size.\n" | ||||
" \"fee\" : n, (numeric) transaction fee in " + | " \"fee\" : n, (numeric) transaction fee in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + "(DEPRECATED)" + | ||||
"\n" | "\n" | ||||
" \"modifiedfee\" : n, (numeric) transaction fee with fee " | " \"modifiedfee\" : n, (numeric) transaction fee with fee " | ||||
"deltas used for mining priority\n" | "deltas used for mining priority (DEPRECATED)\n" | ||||
" \"time\" : n, (numeric) local time transaction " | " \"time\" : n, (numeric) local time transaction " | ||||
"entered pool in seconds since 1 Jan 1970 GMT\n" | "entered pool in seconds since 1 Jan 1970 GMT\n" | ||||
" \"height\" : n, (numeric) block height when " | " \"height\" : n, (numeric) block height when " | ||||
"transaction entered pool\n" | "transaction entered pool\n" | ||||
" \"startingpriority\" : n, (numeric) DEPRECATED. Priority when " | " \"startingpriority\" : n, (numeric) DEPRECATED. Priority when " | ||||
"transaction entered pool\n" | "transaction entered pool\n" | ||||
" \"currentpriority\" : n, (numeric) DEPRECATED. Transaction " | " \"currentpriority\" : n, (numeric) DEPRECATED. Transaction " | ||||
"priority now\n" | "priority now\n" | ||||
" \"descendantcount\" : n, (numeric) number of in-mempool " | " \"descendantcount\" : n, (numeric) number of in-mempool " | ||||
"descendant transactions (including this one)\n" | "descendant transactions (including this one)\n" | ||||
" \"descendantsize\" : n, (numeric) virtual transaction size " | " \"descendantsize\" : n, (numeric) virtual transaction size " | ||||
"of in-mempool descendants (including this one)\n" | "of in-mempool descendants (including this one)\n" | ||||
" \"descendantfees\" : n, (numeric) modified fees (see above) " | " \"descendantfees\" : n, (numeric) modified fees (see above) " | ||||
"of in-mempool descendants (including this one)\n" | "of in-mempool descendants (including this one) (DEPRECATED)\n" | ||||
" \"ancestorcount\" : n, (numeric) number of in-mempool " | " \"ancestorcount\" : n, (numeric) number of in-mempool " | ||||
"ancestor transactions (including this one)\n" | "ancestor transactions (including this one)\n" | ||||
" \"ancestorsize\" : n, (numeric) virtual transaction size " | " \"ancestorsize\" : n, (numeric) virtual transaction size " | ||||
"of in-mempool ancestors (including this one)\n" | "of in-mempool ancestors (including this one)\n" | ||||
" \"ancestorfees\" : n, (numeric) modified fees (see above) " | " \"ancestorfees\" : n, (numeric) modified fees (see above) " | ||||
"of in-mempool ancestors (including this one)\n" | "of in-mempool ancestors (including this one) (DEPRECATED)\n" | ||||
" \"fees\" : {\n" | |||||
" \"base\" : n, (numeric) transaction fee in " + | |||||
CURRENCY_UNIT + | |||||
"\n" | |||||
" \"modified\" : n, (numeric) transaction fee with fee " | |||||
"deltas used for mining priority in " + | |||||
CURRENCY_UNIT + | |||||
"\n" | |||||
" \"ancestor\" : n, (numeric) modified fees (see above) " | |||||
"of in-mempool ancestors (including this one) in " + | |||||
CURRENCY_UNIT + | |||||
"\n" | |||||
" \"descendant\" : n, (numeric) modified fees (see above) " | |||||
"of in-mempool descendants (including this one) in " + | |||||
CURRENCY_UNIT + | |||||
"\n" | |||||
" }\n" | |||||
" \"depends\" : [ (array) unconfirmed transactions " | " \"depends\" : [ (array) unconfirmed transactions " | ||||
"used as inputs for this transaction\n" | "used as inputs for this transaction\n" | ||||
" \"transactionid\", (string) parent transaction id\n" | " \"transactionid\", (string) parent transaction id\n" | ||||
" ... ]\n" | " ... ]\n" | ||||
" \"spentby\" : [ (array) unconfirmed transactions " | " \"spentby\" : [ (array) unconfirmed transactions " | ||||
"spending outputs from this transaction\n" | "spending outputs from this transaction\n" | ||||
" \"transactionid\", (string) child transaction id\n" | " \"transactionid\", (string) child transaction id\n" | ||||
" ... ]\n"; | " ... ]\n"; | ||||
} | } | ||||
static void entryToJSON(UniValue &info, const CTxMemPoolEntry &e) | static void entryToJSON(UniValue &info, const CTxMemPoolEntry &e) | ||||
EXCLUSIVE_LOCKS_REQUIRED(g_mempool.cs) { | EXCLUSIVE_LOCKS_REQUIRED(g_mempool.cs) { | ||||
AssertLockHeld(g_mempool.cs); | AssertLockHeld(g_mempool.cs); | ||||
UniValue fees(UniValue::VOBJ); | |||||
fees.pushKV("base", ValueFromAmount(e.GetFee())); | |||||
fees.pushKV("modified", ValueFromAmount(e.GetModifiedFee())); | |||||
fees.pushKV("ancestor", ValueFromAmount(e.GetModFeesWithAncestors())); | |||||
fees.pushKV("descendant", ValueFromAmount(e.GetModFeesWithDescendants())); | |||||
info.pushKV("fees", fees); | |||||
info.pushKV("size", (int)e.GetTxSize()); | info.pushKV("size", (int)e.GetTxSize()); | ||||
info.pushKV("fee", ValueFromAmount(e.GetFee())); | info.pushKV("fee", ValueFromAmount(e.GetFee())); | ||||
info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee())); | info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee())); | ||||
info.pushKV("time", e.GetTime()); | info.pushKV("time", e.GetTime()); | ||||
info.pushKV("height", (int)e.GetHeight()); | info.pushKV("height", (int)e.GetHeight()); | ||||
info.pushKV("startingpriority", e.GetPriority(e.GetHeight())); | info.pushKV("startingpriority", e.GetPriority(e.GetHeight())); | ||||
info.pushKV("currentpriority", e.GetPriority(chainActive.Height())); | info.pushKV("currentpriority", e.GetPriority(chainActive.Height())); | ||||
info.pushKV("descendantcount", e.GetCountWithDescendants()); | info.pushKV("descendantcount", e.GetCountWithDescendants()); | ||||
▲ Show 20 Lines • Show All 1,776 Lines • Show Last 20 Lines |