aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_segwit.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-06 18:19:45 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-09 12:09:53 -0400
commitfa16a09215f6cce23de0f90d51b3c5df37c6b6a4 (patch)
treeb2c5ece6a9de4cfafa0249f5f923d7b9d0bdd6fb /test/functional/feature_segwit.py
parentfaf77f9b90ac6f29508cc83718989888b4eb5d78 (diff)
downloadbitcoin-fa16a09215f6cce23de0f90d51b3c5df37c6b6a4.tar.xz
scripted-diff: use self.sync_* methods
-BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT-
Diffstat (limited to 'test/functional/feature_segwit.py')
-rwxr-xr-xtest/functional/feature_segwit.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index 226a7dc633..258e7c2675 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -76,13 +76,13 @@ class SegWitTest(BitcoinTestFramework):
send_to_witness(1, node, getutxo(txid), self.pubkey[0], False, Decimal("49.998"), sign, redeem_script)
block = node.generate(1)
assert_equal(len(node.getblock(block[0])["tx"]), 2)
- sync_blocks(self.nodes)
+ self.sync_blocks()
def skip_mine(self, node, txid, sign, redeem_script=""):
send_to_witness(1, node, getutxo(txid), self.pubkey[0], False, Decimal("49.998"), sign, redeem_script)
block = node.generate(1)
assert_equal(len(node.getblock(block[0])["tx"]), 1)
- sync_blocks(self.nodes)
+ self.sync_blocks()
def fail_accept(self, node, error_msg, txid, sign, redeem_script=""):
assert_raises_rpc_error(-26, error_msg, send_to_witness, use_p2wsh=1, node=node, utxo=getutxo(txid), pubkey=self.pubkey[0], encode_p2sh=False, amount=Decimal("49.998"), sign=sign, insert_redeem_script=redeem_script)
@@ -131,7 +131,7 @@ class SegWitTest(BitcoinTestFramework):
p2sh_ids[n][v].append(send_to_witness(v, self.nodes[0], find_spendable_utxo(self.nodes[0], 50), self.pubkey[n], True, Decimal("49.999")))
self.nodes[0].generate(1) # block 163
- sync_blocks(self.nodes)
+ self.sync_blocks()
# Make sure all nodes recognize the transactions as theirs
assert_equal(self.nodes[0].getbalance(), balance_presetup - 60 * 50 + 20 * Decimal("49.999") + 50)
@@ -139,7 +139,7 @@ class SegWitTest(BitcoinTestFramework):
assert_equal(self.nodes[2].getbalance(), 20 * Decimal("49.999"))
self.nodes[0].generate(260) # block 423
- sync_blocks(self.nodes)
+ self.sync_blocks()
self.log.info("Verify witness txs are skipped for mining before the fork")
self.skip_mine(self.nodes[2], wit_ids[NODE_2][WIT_V0][0], True) # block 424
@@ -156,7 +156,7 @@ class SegWitTest(BitcoinTestFramework):
self.log.info("Verify previous witness txs skipped for mining can now be mined")
assert_equal(len(self.nodes[2].getrawmempool()), 4)
blockhash = self.nodes[2].generate(1)[0] # block 432 (first block with new rules; 432 = 144 * 3)
- sync_blocks(self.nodes)
+ self.sync_blocks()
assert_equal(len(self.nodes[2].getrawmempool()), 0)
segwit_tx_list = self.nodes[2].getblock(blockhash)["tx"]
assert_equal(len(segwit_tx_list), 5)
@@ -538,7 +538,7 @@ class SegWitTest(BitcoinTestFramework):
signresults = self.nodes[0].signrawtransactionwithwallet(tx.serialize_without_witness().hex())['hex']
txid = self.nodes[0].sendrawtransaction(signresults, 0)
txs_mined[txid] = self.nodes[0].generate(1)[0]
- sync_blocks(self.nodes)
+ self.sync_blocks()
watchcount = 0
spendcount = 0
for i in self.nodes[0].listunspent():
@@ -590,7 +590,7 @@ class SegWitTest(BitcoinTestFramework):
signresults = self.nodes[0].signrawtransactionwithwallet(tx.serialize_without_witness().hex())['hex']
self.nodes[0].sendrawtransaction(signresults, 0)
self.nodes[0].generate(1)
- sync_blocks(self.nodes)
+ self.sync_blocks()
if __name__ == '__main__':