20
20
UNCONFIRMED_HASH_STRING = 'unconfirmed'
21
21
22
22
def notify_outputname (walletname , txid ):
23
- return txid if os .name == 'nt' else '{ }_{}' . format ( walletname , txid )
23
+ return txid if os .name == 'nt' else f' { walletname } _{ txid } '
24
24
25
25
26
26
class NotificationsTest (BitcoinTestFramework ):
@@ -39,11 +39,11 @@ def setup_network(self):
39
39
40
40
# -alertnotify and -blocknotify on node0, walletnotify on node1
41
41
self .extra_args = [[
42
- "-alertnotify=echo > {}" . format ( os .path .join (self .alertnotify_dir , '%s' )) ,
43
- "-blocknotify=echo > {}" . format ( os .path .join (self .blocknotify_dir , '%s' )) ,
42
+ f "-alertnotify=echo > { os .path .join (self .alertnotify_dir , '%s' )} " ,
43
+ f "-blocknotify=echo > { os .path .join (self .blocknotify_dir , '%s' )} " ,
44
44
], [
45
45
"-rescan" ,
46
- "-walletnotify=echo %h_%b > {}" . format ( os .path .join (self .walletnotify_dir , notify_outputname ('%w' , '%s' ))) ,
46
+ f "-walletnotify=echo %h_%b > { os .path .join (self .walletnotify_dir , notify_outputname ('%w' , '%s' ))} " ,
47
47
]]
48
48
self .wallet_names = [self .default_wallet_name , self .wallet ]
49
49
super ().setup_network ()
@@ -54,12 +54,12 @@ def run_test(self):
54
54
seed = "cTdGmKFWpbvpKQ7ejrdzqYT2hhjyb3GPHnLAK7wdi5Em67YLwSm9"
55
55
xpriv = "tprv8ZgxMBicQKsPfHCsTwkiM1KT56RXbGGTqvc2hgqzycpwbHqqpcajQeMRZoBD35kW4RtyCemu6j34Ku5DEspmgjKdt2qe4SvRch5Kk8B8A2v"
56
56
desc_imports = [{
57
- "desc" : descsum_create ("wpkh(" + xpriv + " /0/*)" ),
57
+ "desc" : descsum_create (f "wpkh({ xpriv } /0/*)" ),
58
58
"timestamp" : 0 ,
59
59
"active" : True ,
60
60
"keypool" : True ,
61
61
},{
62
- "desc" : descsum_create ("wpkh(" + xpriv + " /1/*)" ),
62
+ "desc" : descsum_create (f "wpkh({ xpriv } /1/*)" ),
63
63
"timestamp" : 0 ,
64
64
"active" : True ,
65
65
"keypool" : True ,
0 commit comments