@@ -152,19 +152,20 @@ def test_blockmintxfee_parameter(self):
152152 blockmintxfee_parameter = f"-blockmintxfee={ blockmintxfee_btc_kvb :.8f} "
153153 self .log .info (f"-> Test { blockmintxfee_parameter } ({ blockmintxfee_sat_kvb } sat/kvB)..." )
154154 self .restart_node (0 , extra_args = [blockmintxfee_parameter , '-minrelaytxfee=0' , '-persistmempool=0' ])
155- self .wallet .rescan_utxos () # to avoid spending outputs of txs that are not in mempool anymore after restart
156155 assert_equal (node .getmininginfo ()['blockmintxfee' ], blockmintxfee_btc_kvb )
157156
158157 # submit one tx with exactly the blockmintxfee rate, and one slightly below
159158 tx_with_min_feerate = self .wallet .send_self_transfer (from_node = node , fee_rate = blockmintxfee_btc_kvb , confirmed_only = True )
160159 assert_equal (tx_with_min_feerate ["fee" ], get_fee (tx_with_min_feerate ["tx" ].get_vsize (), blockmintxfee_btc_kvb ))
161- if blockmintxfee_sat_kvb > 5 :
160+ if blockmintxfee_sat_kvb >= 10 :
162161 lowerfee_btc_kvb = blockmintxfee_btc_kvb - Decimal (10 )/ COIN # 0.01 sat/vbyte lower
162+ assert_greater_than (blockmintxfee_btc_kvb , lowerfee_btc_kvb )
163+ assert_greater_than_or_equal (lowerfee_btc_kvb , 0 )
163164 tx_below_min_feerate = self .wallet .send_self_transfer (from_node = node , fee_rate = lowerfee_btc_kvb , confirmed_only = True )
164165 assert_equal (tx_below_min_feerate ["fee" ], get_fee (tx_below_min_feerate ["tx" ].get_vsize (), lowerfee_btc_kvb ))
165166 else : # go below zero fee by using modified fees
166167 tx_below_min_feerate = self .wallet .send_self_transfer (from_node = node , fee_rate = blockmintxfee_btc_kvb , confirmed_only = True )
167- node .prioritisetransaction (tx_below_min_feerate ["txid" ], 0 , - 1 )
168+ node .prioritisetransaction (tx_below_min_feerate ["txid" ], 0 , - 11 )
168169
169170 # check that tx below specified fee-rate is neither in template nor in the actual block
170171 block_template = node .getblocktemplate (NORMAL_GBT_REQUEST_PARAMS )
0 commit comments