aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2017-04-03 15:48:55 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2017-04-03 15:48:55 -0400
commitba7dd8bf6f41de647a8df0c4570df6ac20b08e48 (patch)
tree28a566b433bf0dd0961f5478365bf6fef86b7b80 /test
parent471ed00fcd3b6feb2e37ad071c7ead78b4e2dad7 (diff)
Test prioritisetransaction and ancestor fee state
There is already a similar test for descendant fee state.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/mempool_packages.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py
index 17e3a9a967..feec8a7fd9 100755
--- a/test/functional/mempool_packages.py
+++ b/test/functional/mempool_packages.py
@@ -101,6 +101,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], 1000)