Skip to content

Commit b6ab45a

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25204: rpc: remove deprecated top-level fee fields from mempool entries
885694d doc: add release note about removal of `deprecatedrpc=fees` flag (Sebastian Falbesoner) 387ae8b rpc: 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: ACK 885694d Tree-SHA512: fec6b5be5c3f0cd55738a888b390ef9271e70b2dba913a14ce82427dac002e999f93df298bb3b494f3d1b850a23d2b5b3e010e901543b0d18db9be133579e1ec
2 parents fb7437f + 885694d commit b6ab45a

File tree

4 files changed

+7
-91
lines changed

4 files changed

+7
-91
lines changed

doc/release-notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ Updated RPCs
6262
change that behaviour. Excluding coinbases was previously deprecated in 23.0.
6363
(#25171)
6464

65+
- The `deprecatedrpc=fees` configuration option has been removed. The top-level
66+
fee fields `fee`, `modifiedfee`, `ancestorfees` and `descendantfees` are no
67+
longer returned by RPCs `getmempoolentry`, `getrawmempool(verbose=true)`,
68+
`getmempoolancestors(verbose=true)` and `getmempooldescendants(verbose=true)`.
69+
The same fee fields can be accessed through the `fees` object in the result.
70+
The top-level fee fields were previously deprecated in 23.0. (#25204)
71+
6572
Changes to wallet related RPCs can be found in the Wallet section below.
6673

6774
New RPCs

src/rpc/mempool.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -229,23 +229,12 @@ static std::vector<RPCResult> MempoolEntryDescription()
229229
return {
230230
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."},
231231
RPCResult{RPCResult::Type::NUM, "weight", "transaction weight as defined in BIP 141."},
232-
RPCResult{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true,
233-
"transaction fee, denominated in " + CURRENCY_UNIT + " (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
234-
RPCResult{RPCResult::Type::STR_AMOUNT, "modifiedfee", /*optional=*/true,
235-
"transaction fee with fee deltas used for mining priority, denominated in " + CURRENCY_UNIT +
236-
" (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
237232
RPCResult{RPCResult::Type::NUM_TIME, "time", "local time transaction entered pool in seconds since 1 Jan 1970 GMT"},
238233
RPCResult{RPCResult::Type::NUM, "height", "block height when transaction entered pool"},
239234
RPCResult{RPCResult::Type::NUM, "descendantcount", "number of in-mempool descendant transactions (including this one)"},
240235
RPCResult{RPCResult::Type::NUM, "descendantsize", "virtual transaction size of in-mempool descendants (including this one)"},
241-
RPCResult{RPCResult::Type::STR_AMOUNT, "descendantfees", /*optional=*/true,
242-
"transaction fees of in-mempool descendants (including this one) with fee deltas used for mining priority, denominated in " +
243-
CURRENCY_ATOM + "s (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
244236
RPCResult{RPCResult::Type::NUM, "ancestorcount", "number of in-mempool ancestor transactions (including this one)"},
245237
RPCResult{RPCResult::Type::NUM, "ancestorsize", "virtual transaction size of in-mempool ancestors (including this one)"},
246-
RPCResult{RPCResult::Type::STR_AMOUNT, "ancestorfees", /*optional=*/true,
247-
"transaction fees of in-mempool ancestors (including this one) with fee deltas used for mining priority, denominated in " +
248-
CURRENCY_ATOM + "s (DEPRECATED, returned only if config option -deprecatedrpc=fees is passed)"},
249238
RPCResult{RPCResult::Type::STR_HEX, "wtxid", "hash of serialized transaction, including witness data"},
250239
RPCResult{RPCResult::Type::OBJ, "fees", "",
251240
{
@@ -269,24 +258,12 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
269258

270259
info.pushKV("vsize", (int)e.GetTxSize());
271260
info.pushKV("weight", (int)e.GetTxWeight());
272-
// TODO: top-level fee fields are deprecated. deprecated_fee_fields_enabled blocks should be removed in v24
273-
const bool deprecated_fee_fields_enabled{IsDeprecatedRPCEnabled("fees")};
274-
if (deprecated_fee_fields_enabled) {
275-
info.pushKV("fee", ValueFromAmount(e.GetFee()));
276-
info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee()));
277-
}
278261
info.pushKV("time", count_seconds(e.GetTime()));
279262
info.pushKV("height", (int)e.GetHeight());
280263
info.pushKV("descendantcount", e.GetCountWithDescendants());
281264
info.pushKV("descendantsize", e.GetSizeWithDescendants());
282-
if (deprecated_fee_fields_enabled) {
283-
info.pushKV("descendantfees", e.GetModFeesWithDescendants());
284-
}
285265
info.pushKV("ancestorcount", e.GetCountWithAncestors());
286266
info.pushKV("ancestorsize", e.GetSizeWithAncestors());
287-
if (deprecated_fee_fields_enabled) {
288-
info.pushKV("ancestorfees", e.GetModFeesWithAncestors());
289-
}
290267
info.pushKV("wtxid", pool.vTxHashes[e.vTxHashesIdx].first.ToString());
291268

292269
UniValue fees(UniValue::VOBJ);

test/functional/rpc_mempool_entry_fee_fields_deprecation.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

test/functional/test_runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@
328328
'feature_presegwit_node_upgrade.py',
329329
'feature_settings.py',
330330
'rpc_getdescriptorinfo.py',
331-
'rpc_mempool_entry_fee_fields_deprecation.py',
332331
'rpc_mempool_info.py',
333332
'rpc_help.py',
334333
'feature_dirsymlinks.py',

0 commit comments

Comments
 (0)