mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 22:54:23 +01:00
Modifies e2e tests so pisad can be run and stop from there
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import pytest
|
||||
import random
|
||||
from multiprocessing import Process
|
||||
from decimal import Decimal, getcontext
|
||||
|
||||
import pisa.conf as conf
|
||||
from pisa.pisad import main
|
||||
from pisa.utils.auth_proxy import AuthServiceProxy
|
||||
|
||||
getcontext().prec = 10
|
||||
@@ -48,6 +50,13 @@ def create_txs(bitcoin_cli):
|
||||
return signed_commitment_tx, signed_penalty_tx
|
||||
|
||||
|
||||
def run_pisad():
|
||||
pisad_process = Process(target=main, daemon=True)
|
||||
pisad_process.start()
|
||||
|
||||
return pisad_process
|
||||
|
||||
|
||||
def get_random_value_hex(nbytes):
|
||||
pseudo_random_value = random.getrandbits(8 * nbytes)
|
||||
prv_hex = "{:x}".format(pseudo_random_value)
|
||||
|
||||
Reference in New Issue
Block a user