Skip to content

Commit

Permalink
[rpc] mempoolinfo should take ::minRelayTxFee into account
Browse files Browse the repository at this point in the history
  • Loading branch information
mess110 committed Oct 11, 2017
1 parent 8928093 commit 149dffd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/blockchain.cpp
Expand Up @@ -1345,7 +1345,7 @@ UniValue mempoolInfoToJSON()
ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
size_t maxmempool = gArgs.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())));
ret.push_back(Pair("mempoolminfee", ValueFromAmount(std::max(mempool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK())));

return ret;
}
Expand Down
3 changes: 3 additions & 0 deletions test/functional/wallet.py
Expand Up @@ -33,6 +33,9 @@ def run_test(self):
assert_equal(len(self.nodes[1].listunspent()), 0)
assert_equal(len(self.nodes[2].listunspent()), 0)

self.log.info("Check for mempoolminfee in getmempoolinfo")
assert_equal(self.nodes[0].getmempoolinfo()['mempoolminfee'], Decimal('0.00001000'))

self.log.info("Mining blocks...")

self.nodes[0].generate(1)
Expand Down

0 comments on commit 149dffd

Please sign in to comment.