0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

test: remove unneeded/redundant code in wallet_listtransactions

-> remove unneeded get-out-of IBD generate()
(The test framework already sets up the nodes to be out of IBD
 in setup_nodes(), if setup_clean_chain is not set to True)

-> remove duplicate code line assigning an utxo
This commit is contained in:
Sebastian Falbesoner 2021-06-19 22:42:08 +02:00
parent fb6c6a7938
commit 47915b1187

View file

@ -26,8 +26,6 @@ class ListTransactionsTest(BitcoinTestFramework):
self.skip_if_no_wallet()
def run_test(self):
self.nodes[0].generate(1) # Get out of IBD
self.sync_all()
# Simple send, 0 to 1:
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
self.sync_all()
@ -136,7 +134,6 @@ class ListTransactionsTest(BitcoinTestFramework):
utxo_to_use = get_unconfirmed_utxo_entry(self.nodes[0], txid_1)
assert_equal(utxo_to_use["safe"], True)
utxo_to_use = get_unconfirmed_utxo_entry(self.nodes[1], txid_1)
utxo_to_use = get_unconfirmed_utxo_entry(self.nodes[1], txid_1)
assert_equal(utxo_to_use["safe"], False)
# Create tx2 using createrawtransaction