From e0c27eedcf7671365faf31ef4dcabd2e11aead2d Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Thu, 9 Jul 2020 15:27:01 -0300 Subject: [PATCH] Add main resource files * apitest.properties - config file for customizing ApiTestConfig options * logback.xml - logging config file, will override logback files found in classpath * bitcoin.conf - bitcoin-core regtest config file, overwritten during startup with correct path to blocknofity * blocknotify - bitcoin-core blocknotify config file --- apitest/src/main/resources/apitest.properties | 0 apitest/src/main/resources/bitcoin.conf | 16 ++++++++++++++ apitest/src/main/resources/blocknotify | 20 ++++++++++++++++++ apitest/src/main/resources/logback.xml | 21 +++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 apitest/src/main/resources/apitest.properties create mode 100644 apitest/src/main/resources/bitcoin.conf create mode 100755 apitest/src/main/resources/blocknotify create mode 100644 apitest/src/main/resources/logback.xml diff --git a/apitest/src/main/resources/apitest.properties b/apitest/src/main/resources/apitest.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apitest/src/main/resources/bitcoin.conf b/apitest/src/main/resources/bitcoin.conf new file mode 100644 index 0000000000..7c92bbf0b3 --- /dev/null +++ b/apitest/src/main/resources/bitcoin.conf @@ -0,0 +1,16 @@ +# This file is overwritten by ApiTestConfig.java at startup, to set the correct blocknotify script path. +regtest=1 + +[regtest] +peerbloomfilters=1 +rpcport=18443 + +server=1 +txindex=1 + +# TODO migrate to rpcauth +rpcuser=apitest +rpcpassword=apitest + +# The blocknotify path will be defined and at runtime. +# blocknotify=bash ~/.bitcoin/blocknotify % diff --git a/apitest/src/main/resources/blocknotify b/apitest/src/main/resources/blocknotify new file mode 100755 index 0000000000..210d23f17c --- /dev/null +++ b/apitest/src/main/resources/blocknotify @@ -0,0 +1,20 @@ +#!/bin/bash + +# Regtest ports start with 512* + +# To avoid pesky bitcoind io errors, do not specify ports Bisq is not listening to. + +# SeedNode listens on port 5120 +echo $1 | nc -w 1 127.0.0.1 5120 + +# Arb Node listens on port 5121 +echo $1 | nc -w 1 127.0.0.1 5121 + +# Alice Node listens on port 5122 +echo $1 | nc -w 1 127.0.0.1 5122 + +# Bob Node listens on port 5123 +echo $1 | nc -w 1 127.0.0.1 5123 + +# Some other node listens on port 5124, etc. +# echo $1 | nc -w 1 127.0.0.1 5124 diff --git a/apitest/src/main/resources/logback.xml b/apitest/src/main/resources/logback.xml new file mode 100644 index 0000000000..9c5d0974bf --- /dev/null +++ b/apitest/src/main/resources/logback.xml @@ -0,0 +1,21 @@ + + + + + + %highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30}: %msg %xEx%n) + + + + + + + + + +