MCPcopy Create free account
hub / github.com/ElementsProject/elements / test_maxtxfee_fails

Function test_maxtxfee_fails

test/functional/wallet_bumpfee.py:373–385  ·  view source on GitHub ↗
(self, rbf_node, dest_address)

Source from the content-addressed store, hash-verified

371
372
373def test_maxtxfee_fails(self, rbf_node, dest_address):
374 self.log.info('Test that bumpfee fails when it hits -maxtxfee')
375 # size of bumped transaction (p2wpkh, 1 input, 2 outputs): 141 vbytes
376 # expected bump fee of 141 vbytes * 0.00200000 BTC / 1000 vbytes = 0.00002820 BTC
377 # which exceeds maxtxfee and is expected to raise
378 self.restart_node(1, ['-maxtxfee=0.000025'] + self.extra_args[1])
379 rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)
380 rbfid = spend_one_input(rbf_node, dest_address)
381 assert_raises_rpc_error(-4, "Unable to create transaction. Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)", rbf_node.bumpfee, rbfid)
382 self.restart_node(1, self.extra_args[1])
383 rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)
384 self.connect_nodes(1, 0)
385 self.clear_mempool()
386
387
388def test_watchonly_psbt(self, peer_node, rbf_node, dest_address):

Callers 1

run_testMethod · 0.85

Calls 6

assert_raises_rpc_errorFunction · 0.90
infoMethod · 0.80
connect_nodesMethod · 0.80
clear_mempoolMethod · 0.80
spend_one_inputFunction · 0.70
restart_nodeMethod · 0.45

Tested by

no test coverage detected