mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-01-05 23:44:22 +01:00
Adds pisa conf for e2e testing and initial setup for the regtest node
This commit is contained in:
@@ -18,6 +18,7 @@ def bitcoin_cli():
|
||||
|
||||
@pytest.fixture()
|
||||
def create_txs(bitcoin_cli):
|
||||
set_up_node(bitcoin_cli)
|
||||
utxos = bitcoin_cli.listunspent()
|
||||
|
||||
if len(utxos) == 0:
|
||||
@@ -54,6 +55,12 @@ def create_txs(bitcoin_cli):
|
||||
return signed_commitment_tx.get("hex"), signed_penalty_tx.get("hex")
|
||||
|
||||
|
||||
def set_up_node(bitcoin_cli):
|
||||
# This method will create a new address a mine bitcoin so the node can be used for testing
|
||||
new_addr = bitcoin_cli.getnewaddress()
|
||||
bitcoin_cli.generatetoaddress(101, new_addr)
|
||||
|
||||
|
||||
def build_appointment_data(bitcoin_cli, commitment_tx, penalty_tx):
|
||||
commitment_tx_id = bitcoin_cli.decoderawtransaction(commitment_tx).get("txid")
|
||||
current_height = bitcoin_cli.getblockcount()
|
||||
|
||||
Reference in New Issue
Block a user