15
15
def hashToHex (hash ):
16
16
return format (hash , '064x' )
17
17
18
+
18
19
# Wait up to 60 secs to see if the testnode has received all the expected invs
19
20
def allInvsMatch (invsExpected , testnode ):
20
21
for x in range (60 ):
@@ -24,6 +25,7 @@ def allInvsMatch(invsExpected, testnode):
24
25
time .sleep (1 )
25
26
return False
26
27
28
+
27
29
class TestP2PConn (P2PInterface ):
28
30
def __init__ (self ):
29
31
super ().__init__ ()
@@ -38,6 +40,7 @@ def clear_invs(self):
38
40
with mininode_lock :
39
41
self .txinvs = []
40
42
43
+
41
44
class FeeFilterTest (BitcoinTestFramework ):
42
45
def set_test_params (self ):
43
46
self .num_nodes = 2
@@ -46,7 +49,7 @@ def set_test_params(self):
46
49
# mempool and wallet feerate calculation based on GetFee
47
50
# rounding down 3 places, leading to stranded transactions.
48
51
# See issue #16499
49
- self .extra_args = [["-minrelaytxfee=0.00000100" , "-mintxfee=0.00000100" ]]* self .num_nodes
52
+ self .extra_args = [["-minrelaytxfee=0.00000100" , "-mintxfee=0.00000100" ]] * self .num_nodes
50
53
51
54
def skip_test_if_missing_module (self ):
52
55
self .skip_if_no_wallet ()
@@ -80,7 +83,7 @@ def run_test(self):
80
83
# by the test connection
81
84
node1 .settxfee (Decimal ("0.00000100" ))
82
85
[node1 .sendtoaddress (node1 .getnewaddress (), 1 ) for x in range (3 )]
83
- self .sync_mempools () # must be sure node 0 has received all txs
86
+ self .sync_mempools () # must be sure node 0 has received all txs
84
87
85
88
# Send one transaction from node0 that should be received, so that we
86
89
# we can sync the test on receipt (if node1's txs were relayed, they'd
@@ -100,5 +103,6 @@ def run_test(self):
100
103
assert allInvsMatch (txids , self .nodes [0 ].p2p )
101
104
self .nodes [0 ].p2p .clear_invs ()
102
105
106
+
103
107
if __name__ == '__main__' :
104
108
FeeFilterTest ().main ()
0 commit comments