diff --git a/.cirrus.yml b/.cirrus.yml index d451cfc..f8c6185 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -6,8 +6,8 @@ lint_task: - pip install flake8 - pip install codespell script: - - PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=xmrswap/contrib,.eggs - - codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S contrib,.git,.eggs,*.pyc + - PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=segwit_addr.py,key.py,messages_pb2.py,.eggs + - codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S .git,.eggs,gitianpubkeys,*.pyc,*mnemonics.py test_task: environment: diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index 61e38fd..83900b5 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -529,7 +529,7 @@ class BasicSwap(BaseApp): continue synced = round(self.callcoinrpc(c, 'getblockchaininfo')['verificationprogress'], 3) if synced < 1.0: - raise ValueError('{} chain is still syncing, currently at {}.'.format(synced)) + raise ValueError('{} chain is still syncing, currently at {}.'.format(self.coin_clients[c]['name'], synced)) def setIntKV(self, str_key, int_val): session = scoped_session(self.session_factory) @@ -2419,7 +2419,7 @@ class BasicSwap(BaseApp): q = self.engine.execute('SELECT COUNT(*) FROM offers WHERE expire_at > {}'.format(now)).first() num_offers = q[0] - q = self.engine.execute('SELECT COUNT(*) FROM offers WHERE was_sent = 1'.format(now)).first() + q = self.engine.execute('SELECT COUNT(*) FROM offers WHERE was_sent = 1').first() num_sent_offers = q[0] rv = { diff --git a/bin/basicswap_prepare.py b/bin/basicswap_prepare.py index 135138c..c114fac 100755 --- a/bin/basicswap_prepare.py +++ b/bin/basicswap_prepare.py @@ -242,6 +242,7 @@ def prepareDataDir(coin, settings, data_dir, chain, particl_mnemonic): fp.write('prune=1000\n') elif coin == 'bitcoin': fp.write('prune=1000\n') + fp.write('fallbackfee=0.0002\n') elif coin == 'namecoin': fp.write('prune=1000\n') else: diff --git a/tests/basicswap/mnemonics.py b/tests/basicswap/mnemonics.py new file mode 100644 index 0000000..0150029 --- /dev/null +++ b/tests/basicswap/mnemonics.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Copyright (c) 2020 tecnovert +# Distributed under the MIT software license, see the accompanying +# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php. + +mnemonics = [ + 'abandon baby cabbage dad eager fabric gadget habit ice kangaroo lab absorb', + 'actuel comédie poésie noble facile éprouver brave cellule rotule académie hilarant chambre', + 'ちしき いてざ きおち あしあと ぽちぶくろ こえる さつえい むえき あける ほんき むさぼる ねいろ', +] diff --git a/tests/basicswap/test_reload.py b/tests/basicswap/test_reload.py index 5efec89..06bc283 100644 --- a/tests/basicswap/test_reload.py +++ b/tests/basicswap/test_reload.py @@ -6,7 +6,6 @@ # file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php. """ - export TEST_RELOAD_PATH=/tmp/test_basicswap mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,bitcoin} cp ~/tmp/particl-0.19.1.1-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl @@ -34,6 +33,7 @@ from urllib import parse from basicswap.rpc import ( callrpc_cli, ) +from tests.basicswap.mnemonics import mnemonics import basicswap.config as cfg import bin.basicswap_prepare as prepareSystem @@ -106,12 +106,6 @@ class Test(unittest.TestCase): def setUpClass(cls): super(Test, cls).setUpClass() - mnemonics = [ - 'abandon baby cabbage dad eager fabric gadget habit ice kangaroo lab absorb', - 'actuel comédie poésie noble facile éprouver brave cellule rotule académie hilarant chambre', - 'ちしき いてざ きおち あしあと ぽちぶくろ こえる さつえい むえき あける ほんき むさぼる ねいろ', - ] - for i in range(3): client_path = os.path.join(test_path, 'client{}'.format(i)) config_path = os.path.join(client_path, cfg.CONFIG_FILENAME)