mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge bitcoin/bitcoin#23688: test: remove unneeded sync_all() calls in wallet_listtransactions.py
0ba98eda28
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: ACK0ba98eda28
- thanks for following up. shaavan: ACK0ba98eda28
Tree-SHA512: 451e733865dcb1e424d90289c8c89272837a9af6fd4b77d6c60728c84524d9c792d684b7e601b02a0efda67231183c42dd9040d96214ac7d9473b2808cabe73f
This commit is contained in:
commit
08dcc5912d
1 changed files with 4 additions and 7 deletions
|
@ -4,10 +4,9 @@
|
|||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test the listtransactions API."""
|
||||
|
||||
import shutil
|
||||
import os
|
||||
|
||||
from decimal import Decimal
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from test_framework.messages import (
|
||||
COIN,
|
||||
|
@ -19,6 +18,7 @@ from test_framework.util import (
|
|||
assert_equal,
|
||||
)
|
||||
|
||||
|
||||
class ListTransactionsTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 3
|
||||
|
@ -245,17 +245,14 @@ class ListTransactionsTest(BitcoinTestFramework):
|
|||
# send to an address beyond the next to be generated to test the keypool gap
|
||||
self.nodes[1].sendtoaddress(addr3, "0.001")
|
||||
self.generate(self.nodes[1], 1)
|
||||
self.sync_all()
|
||||
|
||||
# send to an address that is already marked as used due to the keypool gap mechanics
|
||||
self.nodes[1].sendtoaddress(addr2, "0.001")
|
||||
self.generate(self.nodes[1], 1)
|
||||
self.sync_all()
|
||||
|
||||
# send to self transaction
|
||||
self.nodes[0].sendtoaddress(addr1, "0.001")
|
||||
self.generate(self.nodes[0], 1)
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("Verify listtransactions is the same regardless of where the address was generated")
|
||||
transactions0 = self.nodes[0].listtransactions()
|
||||
|
@ -273,7 +270,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
|||
normalize_list(transactions2)
|
||||
assert_equal(transactions0, transactions2)
|
||||
|
||||
self.log.info("Verify labels are persistent on the node generated the addresses")
|
||||
self.log.info("Verify labels are persistent on the node that generated the addresses")
|
||||
assert_equal(['pizza1'], self.nodes[0].getaddressinfo(addr1)['labels'])
|
||||
assert_equal(['pizza2'], self.nodes[0].getaddressinfo(addr2)['labels'])
|
||||
assert_equal(['pizza3'], self.nodes[0].getaddressinfo(addr3)['labels'])
|
||||
|
|
Loading…
Add table
Reference in a new issue