MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / test_settxfee

Function test_settxfee

test/functional/wallet_bumpfee.py:197–207  ·  view source on GitHub ↗
(rbf_node, dest_address)

Source from the content-addressed store, hash-verified

195
196
197def test_settxfee(rbf_node, dest_address):
198 # check that bumpfee reacts correctly to the use of settxfee (paytxfee)
199 rbfid = spend_one_input(rbf_node, dest_address)
200 requested_feerate = Decimal("0.00025000")
201 rbf_node.settxfee(requested_feerate)
202 bumped_tx = rbf_node.bumpfee(rbfid)
203 actual_feerate = bumped_tx["fee"] * 1000 / rbf_node.getrawtransaction(bumped_tx["txid"], True)["vsize"]
204 # Assert that the difference between the requested feerate and the actual
205 # feerate of the bumped transaction is small.
206 assert_greater_than(Decimal("0.00001000"), abs(requested_feerate - actual_feerate))
207 rbf_node.settxfee(Decimal("0.00000000")) # unset paytxfee
208
209
210def test_rebumping(rbf_node, dest_address):

Callers 1

run_testMethod · 0.85

Calls 2

assert_greater_thanFunction · 0.90
spend_one_inputFunction · 0.85

Tested by

no test coverage detected