Skip to content
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

rpc: Add maxmempool and effective min fee to getmempoolinfo #6877

Merged
merged 1 commit into from
Oct 26, 2015

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Oct 23, 2015

I think these can be useful.

Context: lots of these in my log

2015-10-23 06:19:39 b84b52b021d6703dacb85c73b799a232ce6ae1ef7d3a3945c3d2899fc067d642 from peer=7929 was not accepted: mempool min fee not met, 15000 < 20424 (code 66)

Which doesn't give information about the transaction size, so can't reason back to what the effective minfee was.

@btcdrak
Copy link
Contributor

btcdrak commented Oct 23, 2015

Makes sense.

Concept ACK

@@ -772,6 +772,9 @@ UniValue mempoolInfoToJSON()
ret.push_back(Pair("size", (int64_t) mempool.size()));
ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
size_t maxmempool = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
ret.push_back(Pair("effectiveminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"effectiveminfee" seems misleading if your GetMinFee() is 0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better suggestions?
Hm maybe just 'minfee' (context is getmempoolinfo, after all) or 'mempoolminfee'. I agree it's not really the effective number used and shouldn't be named that...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mempoolminfee?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems we have two votes for mempoolminfee - changing to that

@jgarzik
Copy link
Contributor

jgarzik commented Oct 23, 2015

ACK

@laanwj laanwj force-pushed the 2015_10_mempool_effective_fee branch from 507f1b5 to 10e2eae Compare October 26, 2015 08:59
@laanwj laanwj merged commit 10e2eae into bitcoin:master Oct 26, 2015
laanwj added a commit that referenced this pull request Oct 26, 2015
10e2eae rpc: Add maxmempool and effective min fee to getmempoolinfo (Wladimir J. van der Laan)
@@ -772,6 +772,9 @@ UniValue mempoolInfoToJSON()
ret.push_back(Pair("size", (int64_t) mempool.size()));
ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
size_t maxmempool = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
ret.push_back(Pair("mempoolminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd need to update help getmempoolinfo as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented in #7118.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants