mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-05 05:14:51 +02:00
Merge bitcoin/bitcoin#25204: rpc: remove deprecated top-level fee fields from mempool entries
885694d794doc: add release note about removal of `deprecatedrpc=fees` flag (Sebastian Falbesoner)387ae8bc09rpc: remove deprecated fee fields from mempool entries (Sebastian Falbesoner) Pull request description: Deprecating the top-level fee fields (`fee`, `modifiedfee`, `ancestorfees` and `descendantfees`) from the mempool entries and introducing `-deprecatedrpc=fees` was done in PR #22689 (released in v23.0). For the next release v24.0, this configuration option can be removed. ACKs for top commit: fanquake: ACK885694d794Tree-SHA512: fec6b5be5c3f0cd55738a888b390ef9271e70b2dba913a14ce82427dac002e999f93df298bb3b494f3d1b850a23d2b5b3e010e901543b0d18db9be133579e1ec
This commit is contained in:
@@ -229,23 +229,12 @@ static std::vector<RPCResult> MempoolEntryDescription()
|
||||
return {
|
||||
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."},
|
||||
RPCResult{RPCResult::Type::NUM, "weight", "transaction weight as defined in BIP 141."},
|
||||
RPCResult{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true,
|
||||
"transaction fee, denominated in " + CURRENCY_UNIT + " (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
|
||||
RPCResult{RPCResult::Type::STR_AMOUNT, "modifiedfee", /*optional=*/true,
|
||||
"transaction fee with fee deltas used for mining priority, denominated in " + CURRENCY_UNIT +
|
||||
" (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
|
||||
RPCResult{RPCResult::Type::NUM_TIME, "time", "local time transaction entered pool in seconds since 1 Jan 1970 GMT"},
|
||||
RPCResult{RPCResult::Type::NUM, "height", "block height when transaction entered pool"},
|
||||
RPCResult{RPCResult::Type::NUM, "descendantcount", "number of in-mempool descendant transactions (including this one)"},
|
||||
RPCResult{RPCResult::Type::NUM, "descendantsize", "virtual transaction size of in-mempool descendants (including this one)"},
|
||||
RPCResult{RPCResult::Type::STR_AMOUNT, "descendantfees", /*optional=*/true,
|
||||
"transaction fees of in-mempool descendants (including this one) with fee deltas used for mining priority, denominated in " +
|
||||
CURRENCY_ATOM + "s (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
|
||||
RPCResult{RPCResult::Type::NUM, "ancestorcount", "number of in-mempool ancestor transactions (including this one)"},
|
||||
RPCResult{RPCResult::Type::NUM, "ancestorsize", "virtual transaction size of in-mempool ancestors (including this one)"},
|
||||
RPCResult{RPCResult::Type::STR_AMOUNT, "ancestorfees", /*optional=*/true,
|
||||
"transaction fees of in-mempool ancestors (including this one) with fee deltas used for mining priority, denominated in " +
|
||||
CURRENCY_ATOM + "s (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
|
||||
RPCResult{RPCResult::Type::STR_HEX, "wtxid", "hash of serialized transaction, including witness data"},
|
||||
RPCResult{RPCResult::Type::OBJ, "fees", "",
|
||||
{
|
||||
@@ -269,24 +258,12 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
|
||||
|
||||
info.pushKV("vsize", (int)e.GetTxSize());
|
||||
info.pushKV("weight", (int)e.GetTxWeight());
|
||||
// TODO: top-level fee fields are deprecated. deprecated_fee_fields_enabled blocks should be removed in v24
|
||||
const bool deprecated_fee_fields_enabled{IsDeprecatedRPCEnabled("fees")};
|
||||
if (deprecated_fee_fields_enabled) {
|
||||
info.pushKV("fee", ValueFromAmount(e.GetFee()));
|
||||
info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee()));
|
||||
}
|
||||
info.pushKV("time", count_seconds(e.GetTime()));
|
||||
info.pushKV("height", (int)e.GetHeight());
|
||||
info.pushKV("descendantcount", e.GetCountWithDescendants());
|
||||
info.pushKV("descendantsize", e.GetSizeWithDescendants());
|
||||
if (deprecated_fee_fields_enabled) {
|
||||
info.pushKV("descendantfees", e.GetModFeesWithDescendants());
|
||||
}
|
||||
info.pushKV("ancestorcount", e.GetCountWithAncestors());
|
||||
info.pushKV("ancestorsize", e.GetSizeWithAncestors());
|
||||
if (deprecated_fee_fields_enabled) {
|
||||
info.pushKV("ancestorfees", e.GetModFeesWithAncestors());
|
||||
}
|
||||
info.pushKV("wtxid", pool.vTxHashes[e.vTxHashesIdx].first.ToString());
|
||||
|
||||
UniValue fees(UniValue::VOBJ);
|
||||
|
||||
Reference in New Issue
Block a user