From 1767d26de92fd61726b28a9035abb6b5b7f2d0d4 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 14 Jul 2023 15:18:36 +0000 Subject: [PATCH] tests: make regtest tests somewhat faster by faster polling in e-x using https://github.com/spesmilo/electrumx/commit/4e66804dc0d668cd6bd4602b547e2f5b2e227e97 on my machine, before-after: Ran 9 tests in 495.865s Ran 9 tests in 376.183s --- .cirrus.yml | 4 ++-- electrum/tests/regtest/run_electrumx.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 981fffe35..1a4c8af96 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -105,8 +105,8 @@ task: - apt-get update - apt-get -y install libsecp256k1-dev curl jq bc - pip3 install .[tests] - # install e-x some commits after 1.16.0 tag, where it uses same aiorpcx as electrum - - pip3 install git+https://github.com/spesmilo/electrumx.git@c8d2cc0d5cf9e549a90ca876d85fed9a90b8c4ed + # install e-x some commits after 1.16.0 tag + - pip3 install git+https://github.com/spesmilo/electrumx.git@4e66804dc0d668cd6bd4602b547e2f5b2e227e97 - "BITCOIND_VERSION=$(curl https://bitcoincore.org/en/download/ | grep -E -i --only-matching 'Latest version: [0-9\\.]+' | grep -E --only-matching '[0-9\\.]+')" - BITCOIND_FILENAME=bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz - BITCOIND_PATH=/tmp/bitcoind/$BITCOIND_FILENAME diff --git a/electrum/tests/regtest/run_electrumx.sh b/electrum/tests/regtest/run_electrumx.sh index e53cc1688..c1a821611 100755 --- a/electrum/tests/regtest/run_electrumx.sh +++ b/electrum/tests/regtest/run_electrumx.sh @@ -4,4 +4,4 @@ set -eux pipefail cd rm -rf $HOME/electrumx_db mkdir $HOME/electrumx_db -COST_SOFT_LIMIT=0 COST_HARD_LIMIT=0 COIN=BitcoinSegwit SERVICES=tcp://:51001,rpc:// NET=regtest DAEMON_URL=http://doggman:donkey@127.0.0.1:18554 DB_DIRECTORY=$HOME/electrumx_db electrumx_server +COST_SOFT_LIMIT=0 COST_HARD_LIMIT=0 COIN=BitcoinSegwit SERVICES=tcp://:51001,rpc:// NET=regtest DAEMON_URL=http://doggman:donkey@127.0.0.1:18554 DB_DIRECTORY=$HOME/electrumx_db DAEMON_POLL_INTERVAL_BLOCKS=100 DAEMON_POLL_INTERVAL_MEMPOOL=100 electrumx_server