mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge edfeaf6836 into merged_master (Bitcoin PR #19552)
This commit is contained in:
commit
f1d46ae49d
2 changed files with 7 additions and 5 deletions
|
|
@ -8,7 +8,6 @@ from decimal import Decimal
|
|||
|
||||
from test_framework.messages import COIN
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import assert_equal
|
||||
|
||||
# ELEMENTS: this number is implied by DEFAULT_MIN_RELAY_TX_FEE in src/net_processing.cpp
|
||||
# which is different in Elements/Bitcoin and cannot be changed by command-line args
|
||||
|
|
@ -24,12 +23,12 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
|
|||
["-minrelaytxfee={}".format(NORMAL_FEE_FILTER)],
|
||||
["-minrelaytxfee={}".format(NORMAL_FEE_FILTER)],
|
||||
]
|
||||
|
||||
def run_test(self):
|
||||
self.log.info("Check that nodes set minfilter to MAX_MONEY while still in IBD")
|
||||
for node in self.nodes:
|
||||
assert node.getblockchaininfo()['initialblockdownload']
|
||||
for conn_info in node.getpeerinfo():
|
||||
assert_equal(conn_info['minfeefilter'], MAX_FEE_FILTER)
|
||||
self.wait_until(lambda: all(peer['minfeefilter'] == MAX_FEE_FILTER for peer in node.getpeerinfo()))
|
||||
|
||||
# Come out of IBD by generating a block
|
||||
self.nodes[0].generate(1)
|
||||
|
|
@ -38,8 +37,7 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
|
|||
self.log.info("Check that nodes reset minfilter after coming out of IBD")
|
||||
for node in self.nodes:
|
||||
assert not node.getblockchaininfo()['initialblockdownload']
|
||||
for conn_info in node.getpeerinfo():
|
||||
assert_equal(conn_info['minfeefilter'], NORMAL_FEE_FILTER)
|
||||
self.wait_until(lambda: all(peer['minfeefilter'] == NORMAL_FEE_FILTER for peer in node.getpeerinfo()))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ from .util import (
|
|||
disconnect_nodes,
|
||||
get_datadir_path,
|
||||
initialize_datadir,
|
||||
wait_until,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -609,6 +610,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
self.sync_blocks(nodes)
|
||||
self.sync_mempools(nodes)
|
||||
|
||||
def wait_until(self, test_function, timeout=60, lock=None):
|
||||
return wait_until(test_function, timeout=timeout, lock=lock, timeout_factor=self.options.timeout_factor)
|
||||
|
||||
# Private helper methods. These should not be accessed by the subclass test scripts.
|
||||
|
||||
def _start_logging(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue