diff --git a/tests/test_spend.py b/tests/test_spend.py index 4ae75229..d65b7730 100644 --- a/tests/test_spend.py +++ b/tests/test_spend.py @@ -1,6 +1,6 @@ from fixtures import * from test_framework.serializations import PSBT, uint256_from_str -from test_framework.utils import wait_for, COIN, RpcError +from test_framework.utils import sign_and_broadcast_psbt, wait_for, COIN, RpcError def test_spend_change(lianad, bitcoind): @@ -59,14 +59,6 @@ def test_spend_change(lianad, bitcoind): bitcoind.generate_block(1, wait_for_mempool=spend_txid) -def sign_and_broadcast_psbt(lianad, psbt): - txid = psbt.tx.txid().hex() - psbt = lianad.signer.sign_psbt(psbt) - lianad.rpc.updatespend(psbt.to_base64()) - lianad.rpc.broadcastspend(txid) - return txid - - def test_coin_marked_spent(lianad, bitcoind): """Test a spent coin is marked as such under various conditions.""" # Receive a coin in a single transaction