Skip to content

Commit 08dcc59

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23688: test: remove unneeded sync_all() calls in wallet_listtransactions.py
0ba98ed test: remove unneeded sync_all() calls in wallet_listtransactions.py (Sebastian Falbesoner) Pull request description: This is a small follow-up to #23659. The `self.sync_all()` calls after generating blocks can be removed, since that happens automatically per default by the test framework's generate function (if no explicit sync_fun is passed). On the course of touching the file, imports are sorted and the grammar of a log message is fixed. ACKs for top commit: fanquake: ACK 0ba98ed - thanks for following up. shaavan: ACK 0ba98ed Tree-SHA512: 451e733865dcb1e424d90289c8c89272837a9af6fd4b77d6c60728c84524d9c792d684b7e601b02a0efda67231183c42dd9040d96214ac7d9473b2808cabe73f
2 parents 877f3aa + 0ba98ed commit 08dcc59

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/functional/wallet_listtransactions.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the listtransactions API."""
66

7-
import shutil
8-
import os
9-
107
from decimal import Decimal
8+
import os
9+
import shutil
1110

1211
from test_framework.messages import (
1312
COIN,
@@ -19,6 +18,7 @@
1918
assert_equal,
2019
)
2120

21+
2222
class ListTransactionsTest(BitcoinTestFramework):
2323
def set_test_params(self):
2424
self.num_nodes = 3
@@ -245,17 +245,14 @@ def run_externally_generated_address_test(self):
245245
# send to an address beyond the next to be generated to test the keypool gap
246246
self.nodes[1].sendtoaddress(addr3, "0.001")
247247
self.generate(self.nodes[1], 1)
248-
self.sync_all()
249248

250249
# send to an address that is already marked as used due to the keypool gap mechanics
251250
self.nodes[1].sendtoaddress(addr2, "0.001")
252251
self.generate(self.nodes[1], 1)
253-
self.sync_all()
254252

255253
# send to self transaction
256254
self.nodes[0].sendtoaddress(addr1, "0.001")
257255
self.generate(self.nodes[0], 1)
258-
self.sync_all()
259256

260257
self.log.info("Verify listtransactions is the same regardless of where the address was generated")
261258
transactions0 = self.nodes[0].listtransactions()
@@ -273,7 +270,7 @@ def normalize_list(txs):
273270
normalize_list(transactions2)
274271
assert_equal(transactions0, transactions2)
275272

276-
self.log.info("Verify labels are persistent on the node generated the addresses")
273+
self.log.info("Verify labels are persistent on the node that generated the addresses")
277274
assert_equal(['pizza1'], self.nodes[0].getaddressinfo(addr1)['labels'])
278275
assert_equal(['pizza2'], self.nodes[0].getaddressinfo(addr2)['labels'])
279276
assert_equal(['pizza3'], self.nodes[0].getaddressinfo(addr3)['labels'])

0 commit comments

Comments
 (0)