-
Notifications
You must be signed in to change notification settings - Fork 38.1k
[rpc] Introduced a new fees structure that aggregates all sub-field fee types denominated in BTC
#12240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
laanwj
merged 1 commit into
bitcoin:master
from
mryandao:fix-getrawmempool-fee-representation
Apr 26, 2018
Merged
[rpc] Introduced a new fees structure that aggregates all sub-field fee types denominated in BTC
#12240
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,17 +360,23 @@ UniValue getdifficulty(const JSONRPCRequest& request) | |
| std::string EntryDescriptionString() | ||
| { | ||
| return " \"size\" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.\n" | ||
| " \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n" | ||
| " \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n" | ||
| " \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + " (DEPRECATED)\n" | ||
| " \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)\n" | ||
| " \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n" | ||
| " \"height\" : n, (numeric) block height when transaction entered pool\n" | ||
| " \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n" | ||
| " \"descendantsize\" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)\n" | ||
| " \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n" | ||
| " \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)\n" | ||
| " \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n" | ||
| " \"ancestorsize\" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)\n" | ||
| " \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n" | ||
| " \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)\n" | ||
| " \"wtxid\" : hash, (string) hash of serialized transaction, including witness data\n" | ||
| " \"fees\" : {\n" | ||
| " \"base\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n" | ||
| " \"modified\" : n, (numeric) transaction fee with fee deltas used for mining priority in " + CURRENCY_UNIT + "\n" | ||
| " \"ancestor\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in " + CURRENCY_UNIT + "\n" | ||
| " \"descendent\" : n, (numeric) number of in-mempool ancestor transactions (including this one) in " + CURRENCY_UNIT + "\n" | ||
| " }\n" | ||
| " \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n" | ||
| " \"transactionid\", (string) parent transaction id\n" | ||
| " ... ]\n" | ||
|
|
@@ -383,6 +389,13 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e) | |
| { | ||
| AssertLockHeld(mempool.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("size", (int)e.GetTxSize()); | ||
| info.pushKV("fee", ValueFromAmount(e.GetFee())); | ||
| info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee())); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong description?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good pick up. for the
descendentfield, should do as/ancestor/descendent/. Do I make another PR to fix the commit merged into Master?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mryandao Yes, it is only possible through a new pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#13109 fixes the typo