mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
scripted-diff: Remove redundant sync_all and sync_blocks
The sync calls are redundant after a call to generate, because generate already syncs itself. -BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's/(generate[^\n]*\)[^\n]*)(\n|\s)+self.sync_(all|blocks)\([^\)]*\)\n/\1\n/g' $(git grep -l generate ./test) -END VERIFY SCRIPT-
This commit is contained in:
@@ -46,7 +46,6 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
[self.nodes[0].sendtoaddress(addr, 0.5) for addr in addrs]
|
||||
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
|
||||
# For each node, send 0.2 coins back to 0;
|
||||
# - node[1] should pick one 0.5 UTXO and leave the rest
|
||||
@@ -114,7 +113,6 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
self.nodes[0].sendtoaddress(addr_aps, 1.0)
|
||||
self.nodes[0].sendtoaddress(addr_aps, 1.0)
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
with self.nodes[3].assert_debug_log(['Fee non-grouped = 2820, grouped = 4160, using grouped']):
|
||||
txid4 = self.nodes[3].sendtoaddress(self.nodes[0].getnewaddress(), 0.1)
|
||||
tx4 = self.nodes[3].getrawtransaction(txid4, True)
|
||||
@@ -126,7 +124,6 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
addr_aps2 = self.nodes[3].getnewaddress()
|
||||
[self.nodes[0].sendtoaddress(addr_aps2, 1.0) for _ in range(5)]
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
with self.nodes[3].assert_debug_log(['Fee non-grouped = 5520, grouped = 8240, using non-grouped']):
|
||||
txid5 = self.nodes[3].sendtoaddress(self.nodes[0].getnewaddress(), 2.95)
|
||||
tx5 = self.nodes[3].getrawtransaction(txid5, True)
|
||||
@@ -140,7 +137,6 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
addr_aps3 = self.nodes[4].getnewaddress()
|
||||
[self.nodes[0].sendtoaddress(addr_aps3, 1.0) for _ in range(5)]
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
with self.nodes[4].assert_debug_log(['Fee non-grouped = 5520, grouped = 8240, using grouped']):
|
||||
txid6 = self.nodes[4].sendtoaddress(self.nodes[0].getnewaddress(), 2.95)
|
||||
tx6 = self.nodes[4].getrawtransaction(txid6, True)
|
||||
@@ -163,7 +159,6 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
signed_tx = self.nodes[0].signrawtransactionwithwallet(funded_tx['hex'])
|
||||
self.nodes[0].sendrawtransaction(signed_tx['hex'])
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
|
||||
# Check that we can create a transaction that only requires ~100 of our
|
||||
# utxos, without pulling in all outputs and creating a transaction that
|
||||
|
Reference in New Issue
Block a user