diff --git a/test/pisa/e2e/conftest.py b/test/pisa/e2e/conftest.py index 9aa4f83..72e6194 100644 --- a/test/pisa/e2e/conftest.py +++ b/test/pisa/e2e/conftest.py @@ -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() diff --git a/test/pisa/e2e/pisa-conf.py b/test/pisa/e2e/pisa-conf.py new file mode 100644 index 0000000..83fe719 --- /dev/null +++ b/test/pisa/e2e/pisa-conf.py @@ -0,0 +1,31 @@ +# bitcoind +BTC_RPC_USER = "user" +BTC_RPC_PASSWD = "passwd" +BTC_RPC_HOST = "localhost" +BTC_RPC_PORT = 18445 +BTC_NETWORK = "regtest" + +# CHAIN MONITOR +POLLING_DELTA = 60 +BLOCK_WINDOW_SIZE = 10 + +# ZMQ +FEED_PROTOCOL = "tcp" +FEED_ADDR = "127.0.0.1" +FEED_PORT = 28335 + +# PISA +MAX_APPOINTMENTS = 100 +EXPIRY_DELTA = 6 +MIN_TO_SELF_DELAY = 20 +SERVER_LOG_FILE = "pisa.log" +PISA_SECRET_KEY = "pisa_sk.der" + +# PISA-CLI +CLIENT_LOG_FILE = "pisa.log" + +# TEST +TEST_LOG_FILE = "test.log" + +# LEVELDB +DB_PATH = "appointments"