diff --git a/doc/release-notes.md b/doc/release-notes.md
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -5,6 +5,7 @@
This release includes the following features and fixes:
- - The `fees.ancestor` and `fees.descendant` fields from the `getrawmempool`,
+ - The `fees.ancestor`, `fees.descendant`, `descendantcount`, `descendantsize`,
+ `ancestorcount` and `ancestorsize` fields from the `getrawmempool`,
`getmempoolentry`, `getmempoolancestors` and `getmempooldescendants` were
deprecated since v0.27.0 and have been completely removed.
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -193,9 +193,6 @@
virtual bool hasBlocks(const BlockHash &block_hash, int min_height = 0,
std::optional max_height = {}) = 0;
- //! Check if transaction has descendants in mempool.
- virtual bool hasDescendantsInMempool(const TxId &txid) = 0;
-
//! Transaction is added to memory pool, if the transaction fee is below the
//! amount specified by max_tx_fee, and broadcast to all peers if relay is
//! set to true. Return false if the transaction could not be added due to
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -600,14 +600,6 @@
}
return false;
}
- bool hasDescendantsInMempool(const TxId &txid) override {
- if (!m_node.mempool) {
- return false;
- }
- LOCK(m_node.mempool->cs);
- auto it = m_node.mempool->GetIter(txid);
- return it && (*it)->GetCountWithDescendants() > 1;
- }
bool broadcastTransaction(const Config &config,
const CTransactionRef &tx,
const Amount &max_tx_fee, bool relay,
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -457,67 +457,6 @@
static std::vector MempoolEntryDescription() {
const auto &ticker = Currency::get().ticker;
- // Deprecated in v0.27.0
- if (IsDeprecatedRPCEnabled(gArgs, "mempool_ancestors_descendants")) {
- return {
- RPCResult{RPCResult::Type::NUM, "size", "transaction size."},
- 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",
- "DEPRECATED: number of in-mempool descendant transactions "
- "(including this one). Only displayed if the "
- "-deprecatedrpc=mempool_ancestors_descendants option is set"},
- RPCResult{
- RPCResult::Type::NUM, "descendantsize",
- "DEPRECATED: transaction size of in-mempool descendants "
- "(including this one). Only displayed if the "
- "-deprecatedrpc=mempool_ancestors_descendants option is set"},
- RPCResult{
- RPCResult::Type::NUM, "ancestorcount",
- "DEPRECATED: number of in-mempool ancestor transactions "
- "(including this one). Only displayed if the "
- "-deprecatedrpc=mempool_ancestors_descendants option is set"},
- RPCResult{
- RPCResult::Type::NUM, "ancestorsize",
- "DEPRECATED: transaction size of in-mempool ancestors "
- "(including this one). Only displayed if the "
- "-deprecatedrpc=mempool_ancestors_descendants option is set"},
- RPCResult{
- RPCResult::Type::OBJ,
- "fees",
- "",
- {
- RPCResult{RPCResult::Type::STR_AMOUNT, "base",
- "transaction fee in " + ticker},
- RPCResult{RPCResult::Type::STR_AMOUNT, "modified",
- "transaction fee with fee deltas used for "
- "mining priority in " +
- ticker},
- }},
- RPCResult{
- RPCResult::Type::ARR,
- "depends",
- "unconfirmed transactions used as inputs for this transaction",
- {RPCResult{RPCResult::Type::STR_HEX, "transactionid",
- "parent transaction id"}}},
- 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, "unbroadcast",
- "Whether this transaction is currently unbroadcast (initial "
- "broadcast not yet acknowledged by any peers)"},
- };
- }
-
return {
RPCResult{RPCResult::Type::NUM, "size", "transaction size."},
RPCResult{RPCResult::Type::NUM_TIME, "time",
@@ -559,9 +498,6 @@
EXCLUSIVE_LOCKS_REQUIRED(pool.cs) {
AssertLockHeld(pool.cs);
- const bool deprecated_ancestors_descendants =
- IsDeprecatedRPCEnabled(gArgs, "mempool_ancestors_descendants");
-
UniValue fees(UniValue::VOBJ);
fees.pushKV("base", e.GetFee());
fees.pushKV("modified", e.GetModifiedFee());
@@ -570,12 +506,6 @@
info.pushKV("size", (int)e.GetTxSize());
info.pushKV("time", count_seconds(e.GetTime()));
info.pushKV("height", (int)e.GetHeight());
- if (deprecated_ancestors_descendants) {
- info.pushKV("descendantcount", e.GetCountWithDescendants());
- info.pushKV("descendantsize", e.GetSizeWithDescendants());
- info.pushKV("ancestorcount", e.GetCountWithAncestors());
- info.pushKV("ancestorsize", e.GetSizeWithAncestors());
- }
const CTransaction &tx = e.GetTx();
std::set setDepends;
for (const CTxIn &txin : tx.vin) {
diff --git a/src/txmempool.h b/src/txmempool.h
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -79,10 +79,6 @@
* CTxMemPoolEntry stores data about the corresponding transaction, as well as
* data about all in-mempool transactions that depend on the transaction
* ("descendant" transactions).
- *
- * When a new entry is added to the mempool, we update the descendant state
- * (nCountWithDescendants, nSizeWithDescendants, and nModFeesWithDescendants)
- * for all ancestors of the newly added transaction.
*/
class CTxMemPoolEntry {
@@ -119,25 +115,6 @@
//! Track the height and time at which tx was final
LockPoints lockPoints;
- // NOTE:
- // The below members will stop being updated after Wellington activation,
- // and should be removed in the release after Wellington is checkpointed.
- //
- // Information about descendants of this transaction that are in the
- // mempool; if we remove this transaction we must remove all of these
- // descendants as well.
- //! number of descendant transactions
- uint64_t nCountWithDescendants{1};
- //! ... and size
- uint64_t nSizeWithDescendants;
- //! ... and sichecks
- int64_t nSigChecksWithDescendants;
-
- // Analogous statistics for ancestor transactions
- uint64_t nCountWithAncestors{1};
- uint64_t nSizeWithAncestors;
- int64_t nSigChecksWithAncestors;
-
public:
CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, int64_t time,
unsigned int entry_height, bool spends_coinbase,
@@ -169,22 +146,8 @@
// Update the LockPoints after a reorg
void UpdateLockPoints(const LockPoints &lp);
- uint64_t GetCountWithDescendants() const { return nCountWithDescendants; }
- uint64_t GetSizeWithDescendants() const { return nSizeWithDescendants; }
- uint64_t GetVirtualSizeWithDescendants() const;
- int64_t GetSigChecksWithDescendants() const {
- return nSigChecksWithDescendants;
- }
-
bool GetSpendsCoinbase() const { return spendsCoinbase; }
- uint64_t GetCountWithAncestors() const { return nCountWithAncestors; }
- uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; }
- uint64_t GetVirtualSizeWithAncestors() const;
- int64_t GetSigChecksWithAncestors() const {
- return nSigChecksWithAncestors;
- }
-
const Parents &GetMemPoolParentsConst() const { return m_parents; }
const Children &GetMemPoolChildrenConst() const { return m_children; }
Parents &GetMemPoolParents() const { return m_parents; }
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -54,30 +54,12 @@
: tx{_tx}, nFee{fee},
nTxSize(tx->GetTotalSize()), nUsageSize{RecursiveDynamicUsage(tx)},
nTime(time), entryHeight{entry_height}, spendsCoinbase(spends_coinbase),
- sigChecks(_sigChecks), lockPoints(lp), nSizeWithDescendants{GetTxSize()},
- nSigChecksWithDescendants{sigChecks}, nSizeWithAncestors{GetTxSize()},
- nSigChecksWithAncestors{sigChecks} {}
+ sigChecks(_sigChecks), lockPoints(lp) {}
size_t CTxMemPoolEntry::GetTxVirtualSize() const {
return GetVirtualTransactionSize(nTxSize, sigChecks);
}
-// Remove after wellinggton
-uint64_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const {
- // note this is distinct from the sum of descendants' individual virtual
- // sizes, and may be smaller.
- return GetVirtualTransactionSize(nSizeWithDescendants,
- nSigChecksWithDescendants);
-}
-
-// Remove after wellinggton
-uint64_t CTxMemPoolEntry::GetVirtualSizeWithAncestors() const {
- // note this is distinct from the sum of ancestors' individual virtual
- // sizes, and may be smaller.
- return GetVirtualTransactionSize(nSizeWithAncestors,
- nSigChecksWithAncestors);
-}
-
void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) {
feeDelta = newFeeDelta;
}