diff --git a/doc/release-notes.md b/doc/release-notes.md
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -4,4 +4,8 @@
-This is a maintenance release with no user-visible change.
+ - The `fee`, `modifiedfee`, `descendantfees` and `ancestorfees` fields from the
+ `getrawmempool`, `getmempoolentry`, `getmempoolancestors`and
+ `getmempooldescendants` RPCs which have been deprecated for a long time are
+ now removed. They are superseded by the `fees` object field which provides
+ the same information.
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -462,11 +462,6 @@
const auto &ticker = Currency::get().ticker;
return {
RPCResult{RPCResult::Type::NUM, "size", "transaction size."},
- RPCResult{RPCResult::Type::STR_AMOUNT, "fee",
- "transaction fee in " + ticker + " (DEPRECATED)"},
- RPCResult{RPCResult::Type::STR_AMOUNT, "modifiedfee",
- "transaction fee with fee deltas used for mining priority "
- "(DEPRECATED)"},
RPCResult{RPCResult::Type::NUM_TIME, "time",
"local time transaction entered pool in seconds since 1 Jan "
"1970 GMT"},
@@ -478,18 +473,12 @@
RPCResult{RPCResult::Type::NUM, "descendantsize",
"transaction size of in-mempool descendants "
"(including this one)"},
- RPCResult{RPCResult::Type::STR_AMOUNT, "descendantfees",
- "modified fees (see above) of in-mempool descendants "
- "(including this one) (DEPRECATED)"},
RPCResult{
RPCResult::Type::NUM, "ancestorcount",
"number of in-mempool ancestor transactions (including this one)"},
RPCResult{
RPCResult::Type::NUM, "ancestorsize",
"transaction size of in-mempool ancestors (including this one)"},
- RPCResult{RPCResult::Type::STR_AMOUNT, "ancestorfees",
- "modified fees (see above) of in-mempool ancestors "
- "(including this one) (DEPRECATED)"},
RPCResult{RPCResult::Type::OBJ,
"fees",
"",
@@ -540,16 +529,12 @@
info.pushKV("fees", fees);
info.pushKV("size", (int)e.GetTxSize());
- info.pushKV("fee", e.GetFee());
- info.pushKV("modifiedfee", 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());
- info.pushKV("descendantfees", e.GetModFeesWithDescendants() / SATOSHI);
info.pushKV("ancestorcount", e.GetCountWithAncestors());
info.pushKV("ancestorsize", e.GetSizeWithAncestors());
- info.pushKV("ancestorfees", e.GetModFeesWithAncestors() / SATOSHI);
const CTransaction &tx = e.GetTx();
std::set setDepends;
for (const CTxIn &txin : tx.vin) {
diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py
--- a/test/functional/mempool_packages.py
+++ b/test/functional/mempool_packages.py
@@ -6,7 +6,6 @@
from decimal import Decimal
-from test_framework.messages import XEC
from test_framework.p2p import P2PTxInvStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
@@ -105,7 +104,7 @@
sum([mempool[tx]['size'] for tx in mempool]))
ancestor_count = MAX_ANCESTORS
assert_equal(ancestor_fees,
- sum([mempool[tx]['fee'] for tx in mempool]))
+ sum([mempool[tx]['fees']['base'] for tx in mempool]))
descendants = []
ancestors = list(chain)
@@ -116,12 +115,10 @@
# Check that the descendant calculations are correct
assert_equal(mempool[x]['descendantcount'], descendant_count)
- descendant_fees += mempool[x]['fee']
- assert_equal(mempool[x]['modifiedfee'], mempool[x]['fee'])
- assert_equal(mempool[x]['fees']['base'], mempool[x]['fee'])
- assert_equal(mempool[x]['fees']['modified'],
- mempool[x]['modifiedfee'])
- assert_equal(mempool[x]['descendantfees'], descendant_fees * XEC)
+ descendant_fees += mempool[x]['fees']['base']
+ assert_equal(
+ mempool[x]['fees']['modified'],
+ mempool[x]['fees']['base'])
assert_equal(mempool[x]['fees']['descendant'], descendant_fees)
descendant_size += mempool[x]['size']
assert_equal(mempool[x]['descendantsize'], descendant_size)
@@ -129,10 +126,10 @@
# Check that ancestor calculations are correct
assert_equal(mempool[x]['ancestorcount'], ancestor_count)
- assert_equal(mempool[x]['ancestorfees'], ancestor_fees * XEC)
+ assert_equal(mempool[x]['fees']['ancestor'], ancestor_fees)
assert_equal(mempool[x]['ancestorsize'], ancestor_size)
ancestor_size -= mempool[x]['size']
- ancestor_fees -= mempool[x]['fee']
+ ancestor_fees -= mempool[x]['fees']['base']
ancestor_count -= 1
# Check that parent/child list is correct
@@ -191,11 +188,9 @@
mempool = self.nodes[0].getrawmempool(True)
ancestor_fees = 0
for x in chain:
- ancestor_fees += mempool[x]['fee']
+ ancestor_fees += mempool[x]['fees']['base']
assert_equal(mempool[x]['fees']['ancestor'],
ancestor_fees + Decimal('10.00'))
- assert_equal(mempool[x]['ancestorfees'],
- ancestor_fees * XEC + 1000)
# Undo the prioritisetransaction for later tests
self.nodes[0].prioritisetransaction(txid=chain[0], fee_delta=-1000)
@@ -207,11 +202,9 @@
descendant_fees = 0
for x in reversed(chain):
- descendant_fees += mempool[x]['fee']
+ descendant_fees += mempool[x]['fees']['base']
assert_equal(mempool[x]['fees']['descendant'],
descendant_fees + Decimal('10.00'))
- assert_equal(mempool[x]['descendantfees'],
- descendant_fees * XEC + 1000)
# Adding one more transaction on to the chain should fail.
assert_raises_rpc_error(-26, "too-long-mempool-chain",
@@ -234,14 +227,10 @@
descendant_fees = 0
for x in reversed(chain):
- descendant_fees += mempool[x]['fee']
+ descendant_fees += mempool[x]['fees']['base']
if (x == chain[-1]):
- assert_equal(mempool[x]['modifiedfee'],
- mempool[x]['fee'] + satoshi_round(20.00))
assert_equal(mempool[x]['fees']['modified'],
- mempool[x]['fee'] + satoshi_round(20.00))
- assert_equal(mempool[x]['descendantfees'],
- descendant_fees * XEC + 2000)
+ mempool[x]['fees']['base'] + satoshi_round(20.00))
assert_equal(mempool[x]['fees']['descendant'],
descendant_fees + satoshi_round(20.00))
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py
--- a/test/functional/rpc_fundrawtransaction.py
+++ b/test/functional/rpc_fundrawtransaction.py
@@ -406,7 +406,7 @@
# Create same transaction over sendtoaddress.
txId = self.nodes[0].sendtoaddress(
self.nodes[1].getnewaddress(), 1100000)
- signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
+ signedFee = self.nodes[0].getrawmempool(True)[txId]['fees']['base']
# Compare fee.
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
@@ -429,7 +429,7 @@
fundedTx = self.nodes[0].fundrawtransaction(rawtx)
# Create same transaction over sendtoaddress.
txId = self.nodes[0].sendmany("", outputs)
- signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
+ signedFee = self.nodes[0].getrawmempool(True)[txId]['fees']['base']
# Compare fee.
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
@@ -454,7 +454,7 @@
# Create same transaction over sendtoaddress.
txId = self.nodes[0].sendtoaddress(mSigObj, 1100000)
- signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
+ signedFee = self.nodes[0].getrawmempool(True)[txId]['fees']['base']
# Compare fee.
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
@@ -495,7 +495,7 @@
# Create same transaction over sendtoaddress.
txId = self.nodes[0].sendtoaddress(mSigObj, 1100000)
- signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
+ signedFee = self.nodes[0].getrawmempool(True)[txId]['fees']['base']
# Compare fee.
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
@@ -637,7 +637,7 @@
# Create same transaction over sendtoaddress.
txId = self.nodes[1].sendmany("", outputs)
- signedFee = self.nodes[1].getrawmempool(True)[txId]['fee']
+ signedFee = self.nodes[1].getrawmempool(True)[txId]['fees']['base']
# Compare fee.
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)