mirror of
https://github.com/basicswap/basicswap.git
synced 2025-03-12 09:38:03 +00:00
Fix lint and add fallback fee to bitcoin.conf.
This commit is contained in:
parent
356f3d1b15
commit
615b06cfa7
5 changed files with 18 additions and 11 deletions
|
@ -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:
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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:
|
||||
|
|
12
tests/basicswap/mnemonics.py
Normal file
12
tests/basicswap/mnemonics.py
Normal file
|
@ -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',
|
||||
'ちしき いてざ きおち あしあと ぽちぶくろ こえる さつえい むえき あける ほんき むさぼる ねいろ',
|
||||
]
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue