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

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_10_mempool_effective_fee changing 1 files +3 −0
  1. laanwj commented at 7:26 AM on October 23, 2015: member

    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.

  2. laanwj added the label RPC on Oct 23, 2015
  3. laanwj force-pushed on Oct 23, 2015
  4. btcdrak commented at 8:13 AM on October 23, 2015: contributor

    Makes sense.

    Concept ACK

  5. in src/rpcblockchain.cpp:None in 507f1b5431 outdated
     771 | @@ -772,6 +772,9 @@ UniValue mempoolInfoToJSON()
     772 |      ret.push_back(Pair("size", (int64_t) mempool.size()));
     773 |      ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
     774 |      ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
     775 | +    size_t maxmempool = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
     776 | +    ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
     777 | +    ret.push_back(Pair("effectiveminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
    


    TheBlueMatt commented at 9:09 AM on October 23, 2015:

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


    laanwj commented at 9:17 AM on October 23, 2015:

    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...


    TheBlueMatt commented at 12:03 AM on October 24, 2015:

    mempoolminfee?


    laanwj commented at 8:52 AM on October 26, 2015:

    seems we have two votes for mempoolminfee - changing to that

  6. jgarzik commented at 12:57 PM on October 23, 2015: contributor

    ACK

  7. rpc: Add maxmempool and effective min fee to getmempoolinfo 10e2eae35c
  8. laanwj force-pushed on Oct 26, 2015
  9. laanwj merged this on Oct 26, 2015
  10. laanwj closed this on Oct 26, 2015

  11. laanwj referenced this in commit 26f5b34e88 on Oct 26, 2015
  12. in src/rpcblockchain.cpp:None in 10e2eae35c
     771 | @@ -772,6 +772,9 @@ UniValue mempoolInfoToJSON()
     772 |      ret.push_back(Pair("size", (int64_t) mempool.size()));
     773 |      ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
     774 |      ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
     775 | +    size_t maxmempool = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
     776 | +    ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
     777 | +    ret.push_back(Pair("mempoolminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
    


    MarcoFalke commented at 8:11 AM on November 6, 2015:

    You'd need to update help getmempoolinfo as well.


    paveljanik commented at 4:00 PM on November 27, 2015:

    Documented in #7118.

  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me