4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
"""Test the listtransactions API."""
6
6
7
- import shutil
8
- import os
9
-
10
7
from decimal import Decimal
8
+ import os
9
+ import shutil
11
10
12
11
from test_framework .messages import (
13
12
COIN ,
19
18
assert_equal ,
20
19
)
21
20
21
+
22
22
class ListTransactionsTest (BitcoinTestFramework ):
23
23
def set_test_params (self ):
24
24
self .num_nodes = 3
@@ -245,17 +245,14 @@ def run_externally_generated_address_test(self):
245
245
# send to an address beyond the next to be generated to test the keypool gap
246
246
self .nodes [1 ].sendtoaddress (addr3 , "0.001" )
247
247
self .generate (self .nodes [1 ], 1 )
248
- self .sync_all ()
249
248
250
249
# send to an address that is already marked as used due to the keypool gap mechanics
251
250
self .nodes [1 ].sendtoaddress (addr2 , "0.001" )
252
251
self .generate (self .nodes [1 ], 1 )
253
- self .sync_all ()
254
252
255
253
# send to self transaction
256
254
self .nodes [0 ].sendtoaddress (addr1 , "0.001" )
257
255
self .generate (self .nodes [0 ], 1 )
258
- self .sync_all ()
259
256
260
257
self .log .info ("Verify listtransactions is the same regardless of where the address was generated" )
261
258
transactions0 = self .nodes [0 ].listtransactions ()
@@ -273,7 +270,7 @@ def normalize_list(txs):
273
270
normalize_list (transactions2 )
274
271
assert_equal (transactions0 , transactions2 )
275
272
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" )
277
274
assert_equal (['pizza1' ], self .nodes [0 ].getaddressinfo (addr1 )['labels' ])
278
275
assert_equal (['pizza2' ], self .nodes [0 ].getaddressinfo (addr2 )['labels' ])
279
276
assert_equal (['pizza3' ], self .nodes [0 ].getaddressinfo (addr3 )['labels' ])
0 commit comments