(self, rbf_node, dest_address)
| 347 | |
| 348 | |
| 349 | def test_settxfee(self, rbf_node, dest_address): |
| 350 | self.log.info('Test settxfee') |
| 351 | assert_raises_rpc_error(-8, "txfee cannot be less than min relay tx fee", rbf_node.settxfee, Decimal('0.000005')) |
| 352 | assert_raises_rpc_error(-8, "txfee cannot be less than wallet min fee", rbf_node.settxfee, Decimal('0.000015')) |
| 353 | # check that bumpfee reacts correctly to the use of settxfee (paytxfee) |
| 354 | rbfid = spend_one_input(rbf_node, dest_address) |
| 355 | requested_feerate = Decimal("0.00025000") |
| 356 | rbf_node.settxfee(requested_feerate) |
| 357 | bumped_tx = rbf_node.bumpfee(rbfid) |
| 358 | actual_feerate = bumped_tx["fee"] * 1000 / rbf_node.getrawtransaction(bumped_tx["txid"], True)["vsize"] |
| 359 | # Assert that the difference between the requested feerate and the actual |
| 360 | # feerate of the bumped transaction is small. |
| 361 | assert_greater_than(Decimal("0.00001000"), abs(requested_feerate - actual_feerate)) |
| 362 | rbf_node.settxfee(Decimal("0.00000000")) # unset paytxfee |
| 363 | |
| 364 | # check that settxfee respects -maxtxfee |
| 365 | self.restart_node(1, ['-maxtxfee=0.000025'] + self.extra_args[1]) |
| 366 | assert_raises_rpc_error(-8, "txfee cannot be more than wallet max tx fee", rbf_node.settxfee, Decimal('0.00003')) |
| 367 | self.restart_node(1, self.extra_args[1]) |
| 368 | rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT) |
| 369 | self.connect_nodes(1, 0) |
| 370 | self.clear_mempool() |
| 371 | |
| 372 | |
| 373 | def test_maxtxfee_fails(self, rbf_node, dest_address): |
no test coverage detected