diff options
author | josibake <josibake@protonmail.com> | 2021-08-19 15:38:58 +0200 |
---|---|---|
committer | josibake <josibake@protonmail.com> | 2021-11-02 10:05:46 +0100 |
commit | 2f9515f37addabde84c79926d7a24b2897a21dd1 (patch) | |
tree | 8e9f34a92368f7b1c87de8df58201bdd624b8d1a | |
parent | 07ade7db8f919826c5e69bdaf7d54a6ae653175e (diff) |
rpc: move fees object to match help
-rw-r--r-- | src/rpc/blockchain.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 2c7f1a70ae..ccfef3a7c7 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -492,12 +492,6 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool { AssertLockHeld(pool.cs); - UniValue fees(UniValue::VOBJ); - fees.pushKV("base", ValueFromAmount(e.GetFee())); - fees.pushKV("modified", ValueFromAmount(e.GetModifiedFee())); - fees.pushKV("ancestor", ValueFromAmount(e.GetModFeesWithAncestors())); - fees.pushKV("descendant", ValueFromAmount(e.GetModFeesWithDescendants())); - info.pushKV("fees", fees); info.pushKV("vsize", (int)e.GetTxSize()); info.pushKV("weight", (int)e.GetTxWeight()); // 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 info.pushKV("ancestorfees", e.GetModFeesWithAncestors()); } info.pushKV("wtxid", pool.vTxHashes[e.vTxHashesIdx].first.ToString()); + + UniValue fees(UniValue::VOBJ); + fees.pushKV("base", ValueFromAmount(e.GetFee())); + fees.pushKV("modified", ValueFromAmount(e.GetModifiedFee())); + fees.pushKV("ancestor", ValueFromAmount(e.GetModFeesWithAncestors())); + fees.pushKV("descendant", ValueFromAmount(e.GetModFeesWithDescendants())); + info.pushKV("fees", fees); + const CTransaction& tx = e.GetTx(); std::set<std::string> setDepends; for (const CTxIn& txin : tx.vin) |