mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-02 19:52:01 +02:00
test: remove unnecessary finalizepsbt rpc calls
This commit is contained in:
committed by
Matthew Zipkin
parent
e3d484b603
commit
4614332fc4
@ -403,8 +403,7 @@ def test_notmine_bumpfee(self, rbf_node, peer_node, dest_address):
|
||||
def finish_psbtbumpfee(psbt):
|
||||
psbt = rbf_node.walletprocesspsbt(psbt)
|
||||
psbt = peer_node.walletprocesspsbt(psbt["psbt"])
|
||||
final = rbf_node.finalizepsbt(psbt["psbt"])
|
||||
res = rbf_node.testmempoolaccept([final["hex"]])
|
||||
res = rbf_node.testmempoolaccept([psbt["hex"]])
|
||||
assert res[0]["allowed"]
|
||||
assert_greater_than(res[0]["fees"]["base"], old_fee)
|
||||
|
||||
@ -638,8 +637,7 @@ def test_watchonly_psbt(self, peer_node, rbf_node, dest_address):
|
||||
psbt = watcher.walletcreatefundedpsbt([watcher.listunspent()[0]], {dest_address: 0.0005}, 0,
|
||||
{"fee_rate": 1, "add_inputs": False}, True)['psbt']
|
||||
psbt_signed = signer.walletprocesspsbt(psbt=psbt, sign=True, sighashtype="ALL", bip32derivs=True)
|
||||
psbt_final = watcher.finalizepsbt(psbt_signed["psbt"])
|
||||
original_txid = watcher.sendrawtransaction(psbt_final["hex"])
|
||||
original_txid = watcher.sendrawtransaction(psbt_signed["hex"])
|
||||
assert_equal(len(watcher.decodepsbt(psbt)["tx"]["vin"]), 1)
|
||||
|
||||
# bumpfee can't be used on watchonly wallets
|
||||
@ -654,11 +652,10 @@ def test_watchonly_psbt(self, peer_node, rbf_node, dest_address):
|
||||
|
||||
# Sign bumped transaction
|
||||
bumped_psbt_signed = signer.walletprocesspsbt(psbt=bumped_psbt["psbt"], sign=True, sighashtype="ALL", bip32derivs=True)
|
||||
bumped_psbt_final = watcher.finalizepsbt(bumped_psbt_signed["psbt"])
|
||||
assert bumped_psbt_final["complete"]
|
||||
assert bumped_psbt_signed["complete"]
|
||||
|
||||
# Broadcast bumped transaction
|
||||
bumped_txid = watcher.sendrawtransaction(bumped_psbt_final["hex"])
|
||||
bumped_txid = watcher.sendrawtransaction(bumped_psbt_signed["hex"])
|
||||
assert bumped_txid in rbf_node.getrawmempool()
|
||||
assert original_txid not in rbf_node.getrawmempool()
|
||||
|
||||
|
Reference in New Issue
Block a user