Skip to content

Commit b8c5d5d

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#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#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#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
1 parent 3654f15 commit b8c5d5d

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
@@ -1645,7 +1645,7 @@ UniValue mempoolInfoToJSON()
16451645
ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
16461646
size_t maxmempool = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
16471647
ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
1648-
ret.push_back(Pair("mempoolminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
1648+
ret.push_back(Pair("mempoolminfee", ValueFromAmount(std::max(mempool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK())));
16491649
ret.push_back(Pair("instantsendlocks", (int64_t)llmq::quorumInstantSendManager->GetInstantSendLockCount()));
16501650

16511651
return ret;

test/functional/wallet.py

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

39+
self.log.info("Check for mempoolminfee in getmempoolinfo")
40+
assert_equal(self.nodes[0].getmempoolinfo()['mempoolminfee'], Decimal('0.00001000'))
41+
3942
self.log.info("Mining blocks...")
4043

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

0 commit comments

Comments
 (0)