mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge ad3a61c5f5 into merged_master (Bitcoin PR #18895)
This commit is contained in:
commit
d0b2badc94
8 changed files with 52 additions and 8 deletions
|
|
@ -449,6 +449,7 @@ static std::vector<RPCResult> MempoolEntryDescription() { return {
|
|||
RPCResult{RPCResult::Type::ARR, "spentby", "unconfirmed transactions spending outputs from this transaction",
|
||||
{RPCResult{RPCResult::Type::STR_HEX, "transactionid", "child transaction id"}}},
|
||||
RPCResult{RPCResult::Type::BOOL, "bip125-replaceable", "Whether this transaction could be replaced due to BIP125 (replace-by-fee)"},
|
||||
RPCResult{RPCResult::Type::BOOL, "unbroadcast", "Whether this transaction is currently unbroadcast (initial broadcast not yet confirmed)"},
|
||||
};}
|
||||
|
||||
static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPoolEntry& e) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
|
||||
|
|
@ -510,6 +511,7 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
|
|||
}
|
||||
|
||||
info.pushKV("bip125-replaceable", rbfStatus);
|
||||
info.pushKV("unbroadcast", pool.IsUnbroadcastTx(tx.GetHash()));
|
||||
}
|
||||
|
||||
UniValue MempoolToJSON(const CTxMemPool& pool, bool verbose)
|
||||
|
|
@ -1540,7 +1542,7 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool)
|
|||
ret.pushKV("maxmempool", (int64_t) maxmempool);
|
||||
ret.pushKV("mempoolminfee", ValueFromAmount(std::max(pool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK()));
|
||||
ret.pushKV("minrelaytxfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()));
|
||||
|
||||
ret.pushKV("unbroadcastcount", uint64_t{pool.GetUnbroadcastTxs().size()});
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1559,6 +1561,7 @@ static UniValue getmempoolinfo(const JSONRPCRequest& request)
|
|||
{RPCResult::Type::NUM, "maxmempool", "Maximum memory usage for the mempool"},
|
||||
{RPCResult::Type::STR_AMOUNT, "mempoolminfee", "Minimum fee rate in " + CURRENCY_UNIT + "/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"},
|
||||
{RPCResult::Type::STR_AMOUNT, "minrelaytxfee", "Current minimum relay fee for transactions"},
|
||||
{RPCResult::Type::NUM, "unbroadcastcount", "Current number of transactions that haven't passed initial broadcast yet"}
|
||||
}},
|
||||
RPCExamples{
|
||||
HelpExampleCli("getmempoolinfo", "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue