@@ -72,7 +72,7 @@ def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee
72
72
total_in += t ["amount" ]
73
73
tx .vin .append (CTxIn (COutPoint (int (t ["txid" ], 16 ), t ["vout" ]), b"" ))
74
74
if total_in <= amount + fee :
75
- raise RuntimeError ("Insufficient funds: need %d, have %d" % ( amount + fee , total_in ) )
75
+ raise RuntimeError (f "Insufficient funds: need { amount + fee } , have { total_in } " )
76
76
tx .vout .append (CTxOut (int ((total_in - amount - fee ) * COIN ), P2SH_1 ))
77
77
tx .vout .append (CTxOut (int (amount * COIN ), P2SH_2 ))
78
78
# These transactions don't need to be signed, but we still have to insert
@@ -124,8 +124,7 @@ def check_raw_estimates(node, fees_seen):
124
124
assert_greater_than (feerate , 0 )
125
125
126
126
if feerate + delta < min (fees_seen ) or feerate - delta > max (fees_seen ):
127
- raise AssertionError ("Estimated fee (%f) out of range (%f,%f)"
128
- % (feerate , min (fees_seen ), max (fees_seen )))
127
+ raise AssertionError (f"Estimated fee ({ feerate } ) out of range ({ min (fees_seen )} ,{ max (fees_seen )} )" )
129
128
130
129
def check_smart_estimates (node , fees_seen ):
131
130
"""Call estimatesmartfee and verify that the estimates meet certain invariants."""
@@ -138,11 +137,9 @@ def check_smart_estimates(node, fees_seen):
138
137
assert_greater_than (feerate , 0 )
139
138
140
139
if feerate + delta < min (fees_seen ) or feerate - delta > max (fees_seen ):
141
- raise AssertionError ("Estimated fee (%f) out of range (%f,%f)"
142
- % (feerate , min (fees_seen ), max (fees_seen )))
140
+ raise AssertionError (f"Estimated fee ({ feerate } ) out of range ({ min (fees_seen )} ,{ max (fees_seen )} )" )
143
141
if feerate - delta > last_feerate :
144
- raise AssertionError ("Estimated fee (%f) larger than last fee (%f) for lower number of confirms"
145
- % (feerate , last_feerate ))
142
+ raise AssertionError (f"Estimated fee ({ feerate } ) larger than last fee ({ last_feerate } ) for lower number of confirms" )
146
143
last_feerate = feerate
147
144
148
145
if i == 0 :
0 commit comments