@@ -283,7 +283,7 @@ def func_wrapper(self, *args, **kwargs):
283
283
func (self , * args , ** kwargs )
284
284
# Each subtest should leave some utxos for the next subtest
285
285
assert self .utxo
286
- sync_blocks ( self .nodes )
286
+ self .sync_blocks ( )
287
287
# Assert segwit status is as expected at end of subtest
288
288
assert_equal (get_bip9_status (self .nodes [0 ], 'segwit' )['status' ], self .segwit_status )
289
289
@@ -644,7 +644,7 @@ def test_standardness_v0(self):
644
644
# Mine it on test_node to create the confirmed output.
645
645
test_transaction_acceptance (self .nodes [0 ], self .test_node , p2sh_tx , with_witness = True , accepted = True )
646
646
self .nodes [0 ].generate (1 )
647
- sync_blocks ( self .nodes )
647
+ self .sync_blocks ( )
648
648
649
649
# Now test standardness of v0 P2WSH outputs.
650
650
# Start by creating a transaction with two outputs.
@@ -675,7 +675,7 @@ def test_standardness_v0(self):
675
675
tx3 = CTransaction ()
676
676
# tx and tx2 were both accepted. Don't bother trying to reclaim the
677
677
# P2PKH output; just send tx's first output back to an anyone-can-spend.
678
- sync_mempools ([self .nodes [0 ], self .nodes [1 ]])
678
+ self . sync_mempools ([self .nodes [0 ], self .nodes [1 ]])
679
679
tx3 .vin = [CTxIn (COutPoint (tx .sha256 , 0 ), b"" )]
680
680
tx3 .vout = [CTxOut (tx .vout [0 ].nValue - 1000 , CScript ([OP_TRUE , OP_DROP ] * 15 + [OP_TRUE ]))]
681
681
tx3 .wit .vtxinwit .append (CTxInWitness ())
@@ -694,7 +694,7 @@ def test_standardness_v0(self):
694
694
test_transaction_acceptance (self .nodes [0 ], self .test_node , tx3 , with_witness = True , accepted = True )
695
695
696
696
self .nodes [0 ].generate (1 )
697
- sync_blocks ( self .nodes )
697
+ self .sync_blocks ( )
698
698
self .utxo .pop (0 )
699
699
self .utxo .append (UTXO (tx3 .sha256 , 0 , tx3 .vout [0 ].nValue ))
700
700
assert_equal (len (self .nodes [1 ].getrawmempool ()), 0 )
@@ -732,7 +732,7 @@ def test_p2sh_witness(self):
732
732
block = self .build_next_block ()
733
733
self .update_witness_block_with_transactions (block , [tx ])
734
734
test_witness_block (self .nodes [0 ], self .test_node , block , accepted = True , with_witness = True )
735
- sync_blocks ( self .nodes )
735
+ self .sync_blocks ( )
736
736
737
737
# Now test attempts to spend the output.
738
738
spend_tx = CTransaction ()
@@ -1377,7 +1377,7 @@ def test_segwit_versions(self):
1377
1377
for i in range (NUM_SEGWIT_VERSIONS ):
1378
1378
self .utxo .append (UTXO (tx .sha256 , i , split_value ))
1379
1379
1380
- sync_blocks ( self .nodes )
1380
+ self .sync_blocks ( )
1381
1381
temp_utxo = []
1382
1382
tx = CTransaction ()
1383
1383
witness_program = CScript ([OP_TRUE ])
@@ -1395,7 +1395,7 @@ def test_segwit_versions(self):
1395
1395
temp_utxo .append (UTXO (tx .sha256 , 0 , tx .vout [0 ].nValue ))
1396
1396
1397
1397
self .nodes [0 ].generate (1 ) # Mine all the transactions
1398
- sync_blocks ( self .nodes )
1398
+ self .sync_blocks ( )
1399
1399
assert len (self .nodes [0 ].getrawmempool ()) == 0
1400
1400
1401
1401
# Finally, verify that version 0 -> version 1 transactions
@@ -1432,7 +1432,7 @@ def test_segwit_versions(self):
1432
1432
block = self .build_next_block ()
1433
1433
self .update_witness_block_with_transactions (block , [tx2 , tx3 ])
1434
1434
test_witness_block (self .nodes [0 ], self .test_node , block , accepted = True )
1435
- sync_blocks ( self .nodes )
1435
+ self .sync_blocks ( )
1436
1436
1437
1437
# Add utxo to our list
1438
1438
self .utxo .append (UTXO (tx3 .sha256 , 0 , tx3 .vout [0 ].nValue ))
@@ -1460,7 +1460,7 @@ def test_premature_coinbase_witness_spend(self):
1460
1460
1461
1461
# Now test a premature spend.
1462
1462
self .nodes [0 ].generate (98 )
1463
- sync_blocks ( self .nodes )
1463
+ self .sync_blocks ( )
1464
1464
block2 = self .build_next_block ()
1465
1465
self .update_witness_block_with_transactions (block2 , [spend_tx ])
1466
1466
test_witness_block (self .nodes [0 ], self .test_node , block2 , accepted = False )
@@ -1470,7 +1470,7 @@ def test_premature_coinbase_witness_spend(self):
1470
1470
block2 = self .build_next_block ()
1471
1471
self .update_witness_block_with_transactions (block2 , [spend_tx ])
1472
1472
test_witness_block (self .nodes [0 ], self .test_node , block2 , accepted = True )
1473
- sync_blocks ( self .nodes )
1473
+ self .sync_blocks ( )
1474
1474
1475
1475
@subtest
1476
1476
def test_uncompressed_pubkey (self ):
@@ -1600,7 +1600,7 @@ def test_signature_version_1(self):
1600
1600
block = self .build_next_block ()
1601
1601
self .update_witness_block_with_transactions (block , [tx ])
1602
1602
test_witness_block (self .nodes [0 ], self .test_node , block , accepted = True )
1603
- sync_blocks ( self .nodes )
1603
+ self .sync_blocks ( )
1604
1604
self .utxo .pop (0 )
1605
1605
1606
1606
# Test each hashtype
@@ -1779,7 +1779,7 @@ def test_non_standard_witness_blinding(self):
1779
1779
tx .rehash ()
1780
1780
test_transaction_acceptance (self .nodes [0 ], self .test_node , tx , False , True )
1781
1781
self .nodes [0 ].generate (1 )
1782
- sync_blocks ( self .nodes )
1782
+ self .sync_blocks ( )
1783
1783
1784
1784
# We'll add an unnecessary witness to this transaction that would cause
1785
1785
# it to be non-standard, to test that violating policy with a witness
@@ -1808,7 +1808,7 @@ def test_non_standard_witness_blinding(self):
1808
1808
test_transaction_acceptance (self .nodes [0 ], self .test_node , tx3 , False , True )
1809
1809
1810
1810
self .nodes [0 ].generate (1 )
1811
- sync_blocks ( self .nodes )
1811
+ self .sync_blocks ( )
1812
1812
1813
1813
# Update our utxo list; we spent the first entry.
1814
1814
self .utxo .pop (0 )
@@ -1844,7 +1844,7 @@ def test_non_standard_witness(self):
1844
1844
test_transaction_acceptance (self .nodes [0 ], self .test_node , tx , with_witness = False , accepted = True )
1845
1845
1846
1846
self .nodes [0 ].generate (1 )
1847
- sync_blocks ( self .nodes )
1847
+ self .sync_blocks ( )
1848
1848
1849
1849
# Creating transactions for tests
1850
1850
p2wsh_txs = []
@@ -1908,7 +1908,7 @@ def test_non_standard_witness(self):
1908
1908
1909
1909
self .nodes [0 ].generate (1 ) # Mine and clean up the mempool of non-standard node
1910
1910
# Valid but non-standard transactions in a block should be accepted by standard node
1911
- sync_blocks ( self .nodes )
1911
+ self .sync_blocks ( )
1912
1912
assert_equal (len (self .nodes [0 ].getrawmempool ()), 0 )
1913
1913
assert_equal (len (self .nodes [1 ].getrawmempool ()), 0 )
1914
1914
@@ -1923,7 +1923,7 @@ def test_upgrade_after_activation(self):
1923
1923
self .start_node (2 , extra_args = ["-vbparams=segwit:0:999999999999" ])
1924
1924
connect_nodes (self .nodes [0 ], 2 )
1925
1925
1926
- sync_blocks ( self .nodes )
1926
+ self .sync_blocks ( )
1927
1927
1928
1928
# Make sure that this peer thinks segwit has activated.
1929
1929
assert get_bip9_status (self .nodes [2 ], 'segwit' )['status' ] == "active"
@@ -2020,7 +2020,7 @@ def test_witness_sigops(self):
2020
2020
test_witness_block (self .nodes [0 ], self .test_node , block_4 , accepted = True )
2021
2021
2022
2022
# Reset the tip back down for the next test
2023
- sync_blocks ( self .nodes )
2023
+ self .sync_blocks ( )
2024
2024
for x in self .nodes :
2025
2025
x .invalidateblock (block_4 .hash )
2026
2026
0 commit comments