Test prioritisetransaction and ancestor fee state

There is already a similar test for descendant fee state.

Github-Pull: #10144
Rebased-From: ba7dd8bf6f
This commit is contained in:
Suhas Daftuar 2017-04-03 15:48:55 -04:00 committed by Wladimir J. van der Laan
parent 0e5133cb2e
commit d947afc0f7
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 12 additions and 0 deletions

View File

@ -102,6 +102,18 @@ class MempoolPackagesTest(BitcoinTestFramework):
assert_equal(mempool[x], v_descendants[x])
assert(chain[0] not in v_descendants.keys())
# Check that ancestor modified fees includes fee deltas from
# prioritisetransaction
self.nodes[0].prioritisetransaction(chain[0], 1000)
mempool = self.nodes[0].getrawmempool(True)
ancestor_fees = 0
for x in chain:
ancestor_fees += mempool[x]['fee']
assert_equal(mempool[x]['ancestorfees'], ancestor_fees * COIN + 1000)
# Undo the prioritisetransaction for later tests
self.nodes[0].prioritisetransaction(chain[0], -1000)
# Check that descendant modified fees includes fee deltas from
# prioritisetransaction
self.nodes[0].prioritisetransaction(chain[-1], 0, 1000)