@@ -492,12 +492,6 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
492492{
493493 AssertLockHeld (pool.cs );
494494
495- UniValue fees (UniValue::VOBJ);
496- fees.pushKV (" base" , ValueFromAmount (e.GetFee ()));
497- fees.pushKV (" modified" , ValueFromAmount (e.GetModifiedFee ()));
498- fees.pushKV (" ancestor" , ValueFromAmount (e.GetModFeesWithAncestors ()));
499- fees.pushKV (" descendant" , ValueFromAmount (e.GetModFeesWithDescendants ()));
500- info.pushKV (" fees" , fees);
501495 info.pushKV (" vsize" , (int )e.GetTxSize ());
502496 info.pushKV (" weight" , (int )e.GetTxWeight ());
503497 // TODO: top-level fee fields are deprecated. deprecated_fee_fields_enabled blocks should be removed in v24
@@ -519,6 +513,14 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
519513 info.pushKV (" ancestorfees" , e.GetModFeesWithAncestors ());
520514 }
521515 info.pushKV (" wtxid" , pool.vTxHashes [e.vTxHashesIdx ].first .ToString ());
516+
517+ UniValue fees (UniValue::VOBJ);
518+ fees.pushKV (" base" , ValueFromAmount (e.GetFee ()));
519+ fees.pushKV (" modified" , ValueFromAmount (e.GetModifiedFee ()));
520+ fees.pushKV (" ancestor" , ValueFromAmount (e.GetModFeesWithAncestors ()));
521+ fees.pushKV (" descendant" , ValueFromAmount (e.GetModFeesWithDescendants ()));
522+ info.pushKV (" fees" , fees);
523+
522524 const CTransaction& tx = e.GetTx ();
523525 std::set<std::string> setDepends;
524526 for (const CTxIn& txin : tx.vin )
0 commit comments