func test: use utils function
This commit is contained in:
parent
5a56fdb108
commit
04503225bc
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user