Skip to content

Commit

Permalink
func test: use utils function
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Dec 12, 2023
1 parent b9cf62d commit 0465cf9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/test_spend.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -55,14 +55,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
Expand Down

0 comments on commit 0465cf9

Please sign in to comment.