mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 8237889e8d into merged_master (Bitcoin PR #17435)
This commit is contained in:
commit
90d5425abf
1 changed files with 17 additions and 2 deletions
|
|
@ -16,12 +16,20 @@ from test_framework.util import (
|
|||
)
|
||||
import time
|
||||
|
||||
# default limits
|
||||
MAX_ANCESTORS = 25
|
||||
MAX_DESCENDANTS = 25
|
||||
|
||||
# custom limits for node1
|
||||
MAX_ANCESTORS_CUSTOM = 5
|
||||
|
||||
class MempoolPackagesTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.extra_args = [["-maxorphantx=1000"], ["-maxorphantx=1000", "-limitancestorcount=5"]]
|
||||
self.extra_args = [
|
||||
["-maxorphantx=1000"],
|
||||
["-maxorphantx=1000", "-limitancestorcount={}".format(MAX_ANCESTORS_CUSTOM)],
|
||||
]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
|
@ -214,7 +222,14 @@ class MempoolPackagesTest(BitcoinTestFramework):
|
|||
assert_equal(mempool[x]['descendantfees'], descendant_fees * COIN + 2000)
|
||||
assert_equal(mempool[x]['fees']['descendant'], descendant_fees+satoshi_round(0.00002))
|
||||
|
||||
# TODO: check that node1's mempool is as expected
|
||||
# Check that node1's mempool is as expected (-> custom ancestor limit)
|
||||
mempool0 = self.nodes[0].getrawmempool(False)
|
||||
mempool1 = self.nodes[1].getrawmempool(False)
|
||||
assert_equal(len(mempool1), MAX_ANCESTORS_CUSTOM)
|
||||
assert set(mempool1).issubset(set(mempool0))
|
||||
for tx in chain[:MAX_ANCESTORS_CUSTOM]:
|
||||
assert tx in mempool1
|
||||
# TODO: more detailed check of node1's mempool (fees etc.)
|
||||
|
||||
# TODO: test ancestor size limits
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue