Skip to content

Commit 9bad8d6

Browse files
committed
Merge #11475: [rpc] mempoolinfo should take ::minRelayTxFee into account
149dffd [rpc] mempoolinfo should take ::minRelayTxFee into account (Cristian Mircea Messel) Pull request description: Fixes #6941 following bitcoin/bitcoin#11410 (comment) 's suggestion This takes care of the mentioned ticket without changing the behavior of https://github.com/bitcoin/bitcoin/pull/11410/files#diff-24efdb00bfbe56b140fb006b562cc70bL629 By modifying https://github.com/bitcoin/bitcoin/blob/5a9da37fb3f4b53f556e1d46509b94dc3c661d75/src/txmempool.cpp#L984 the syncing mempools becomes problematic as per bitcoin/bitcoin#11410 (comment) ~~Same code causes different tests to fail: https://travis-ci.org/bitcoin/bitcoin/jobs/286128241 https://travis-ci.org/bitcoin/bitcoin/jobs/286128241 . I can't reproduce the problems locally, am I doing something wrong?~~ travis sometimes fails unexpectedly Tree-SHA512: fd81628da6a3eff51bd09e5342d781bac0710f79d6b330b1df3662756ecaceb2e1682bf9768b5f8edbcba6479a3223dfa6604d37c9e9d37d00d077172da4f6ea
2 parents 8f68fd2 + 149dffd commit 9bad8d6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ UniValue mempoolInfoToJSON()
13501350
ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
13511351
size_t maxmempool = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
13521352
ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
1353-
ret.push_back(Pair("mempoolminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
1353+
ret.push_back(Pair("mempoolminfee", ValueFromAmount(std::max(mempool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK())));
13541354

13551355
return ret;
13561356
}

test/functional/wallet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def run_test(self):
3333
assert_equal(len(self.nodes[1].listunspent()), 0)
3434
assert_equal(len(self.nodes[2].listunspent()), 0)
3535

36+
self.log.info("Check for mempoolminfee in getmempoolinfo")
37+
assert_equal(self.nodes[0].getmempoolinfo()['mempoolminfee'], Decimal('0.00001000'))
38+
3639
self.log.info("Mining blocks...")
3740

3841
self.nodes[0].generate(1)

0 commit comments

Comments
 (0)