per #22682 , top level fee fields for mempool entries have been deprecated since 0.17 but are still returned. this PR properly deprecates them so that they are no longer returned unless -deprecatedrpc=fees
is passed.
the first commit takes care of deprecation and also updates test/functional/mempool_packages.py
to only use the fees
object. the second commit adds a new functional test for -deprecatedrpc=fees
closes #22682
questions for the reviewer
-deprecatedrpc=fees
made the most sense to me, but happy to change if there is a name that makes more sense- #22682 seems to indicate that after some period of time, the fields will be removed all together. if we have a rough idea of when this will be, i can add a
TODO: fully remove in vXX
comment toentryToJSON
testing
to get started on testing, compile, run the tests, and start your node with the deprecated rpcs flag:
0./src/bitcoind -daemon -deprecatedrpc=fees
you should see entries with the deprecated fields like so:
0{
1 "<txid>": {
2 "fees": {
3 "base": 0.00000671,
4 "modified": 0.00000671,
5 "ancestor": 0.00000671,
6 "descendant": 0.00000671
7 },
8 "fee": 0.00000671,
9 "modifiedfee": 0.00000671,
10 "descendantfees": 671,
11 "ancestorfees": 671,
12 "vsize": 144,
13 "weight": 573,
14 ...
15 },
you can also check getmempoolentry
using any of the txid’s from the output above.
next start the node without the deprecated flag, repeat the commands from above and verify that the deprecated fields are no longer present at the top level, but present in the “fees” object