Skip to content

Commit 7066980

Browse files
committed
Merge bitcoin/bitcoin#29948: test: add missing comparison of node1's mempool in MempoolPackagesTest
e912717 test: add missing comparison of node1's mempool in MempoolPackagesTest (umiumi) Pull request description: #29941 Recreated a pull request because there was a conflict. Trying to resolve the conflict but the old one automatically closed. Add missing comparison for TODO comments in `mempool_packages.py` Also, notice that the ancestor size limits and descendant size limits actually implemented in #21800 , so I removed the todo for those two size limits. ACKs for top commit: kevkevinpal: ACK [e912717](bitcoin/bitcoin@e912717) achow101: ACK e912717 alfonsoromanz: Tested ACK e912717. The code looks good to me and the test execution is successful. rkrux: tACK [e912717](bitcoin/bitcoin@e912717) Tree-SHA512: 8cb51746b0547369344c9ceef59599bfe9c91d424687af5e24dc6641f9e99fb433515d79c724e71fd3d5e02994f0cef623d3674367b8296b05c3c6fcdde282ef
2 parents 98dd4e7 + e912717 commit 7066980

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

test/functional/mempool_packages.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ def run_test(self):
199199
assert set(mempool1).issubset(set(mempool0))
200200
for tx in chain[:CUSTOM_ANCESTOR_LIMIT]:
201201
assert tx in mempool1
202-
# TODO: more detailed check of node1's mempool (fees etc.)
203-
# check transaction unbroadcast info (should be false if in both mempools)
204-
mempool = self.nodes[0].getrawmempool(True)
205-
for tx in mempool:
206-
assert_equal(mempool[tx]['unbroadcast'], False)
207-
208-
# TODO: test ancestor size limits
202+
entry0 = self.nodes[0].getmempoolentry(tx)
203+
entry1 = self.nodes[1].getmempoolentry(tx)
204+
assert not entry0['unbroadcast']
205+
assert not entry1['unbroadcast']
206+
assert_equal(entry1['fees']['base'], entry0['fees']['base'])
207+
assert_equal(entry1['vsize'], entry0['vsize'])
208+
assert_equal(entry1['depends'], entry0['depends'])
209209

210210
# Now test descendant chain limits
211211

@@ -251,10 +251,14 @@ def run_test(self):
251251
assert tx in mempool1
252252
for tx in chain[CUSTOM_DESCENDANT_LIMIT:]:
253253
assert tx not in mempool1
254-
# TODO: more detailed check of node1's mempool (fees etc.)
255-
256-
# TODO: test descendant size limits
257-
254+
for tx in mempool1:
255+
entry0 = self.nodes[0].getmempoolentry(tx)
256+
entry1 = self.nodes[1].getmempoolentry(tx)
257+
assert not entry0['unbroadcast']
258+
assert not entry1['unbroadcast']
259+
assert_equal(entry1['fees']['base'], entry0['fees']['base'])
260+
assert_equal(entry1['vsize'], entry0['vsize'])
261+
assert_equal(entry1['depends'], entry0['depends'])
258262
# Test reorg handling
259263
# First, the basics:
260264
self.generate(self.nodes[0], 1)

0 commit comments

Comments
 (0)