Skip to content

Commit

Permalink
Merge pull request #7368
Browse files Browse the repository at this point in the history
4d10d2e Eliminate race condition in mempool_packages test (Suhas Daftuar)
  • Loading branch information
laanwj committed Jan 18, 2016
2 parents fd9356b + 4d10d2e commit f2cf071
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qa/rpc-tests/mempool_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,18 @@ def run_test(self):
print "too-long-ancestor-chain successfully rejected"

# Check that prioritising a tx before it's added to the mempool works
# First clear the mempool by mining a block.
self.nodes[0].generate(1)
sync_blocks(self.nodes)
assert_equal(len(self.nodes[0].getrawmempool()), 0)
# Prioritise a transaction that has been mined, then add it back to the
# mempool by using invalidateblock.
self.nodes[0].prioritisetransaction(chain[-1], 0, 2000)
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
# Keep node1's tip synced with node0
self.nodes[1].invalidateblock(self.nodes[1].getbestblockhash())

# Now check that the transaction is in the mempool, with the right modified fee
mempool = self.nodes[0].getrawmempool(True)

descendant_fees = 0
Expand Down

0 comments on commit f2cf071

Please sign in to comment.