coins: Raise Particl Version

This commit is contained in:
tecnovert 2021-11-01 16:47:32 +02:00
parent 6e82961da9
commit f9f26c92c2
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
8 changed files with 25 additions and 12 deletions

View file

@ -118,15 +118,18 @@ class XMRInterface(CoinInterface):
# get_block_count returns "Internal error" if bootstrap-daemon is active
# rv['blocks'] = self.rpc_cb('get_block_count')['count']
rv['blocks'] = self.rpc_cb2('get_height')['height']
rv['verificationprogress'] = 0 # TODO
rv['blocks'] = self.rpc_cb2('get_height', timeout=30)['height']
sync_info = self.rpc_cb('sync_info', timeout=30)
rv['verificationprogress'] = 0.0 if 'spans' in sync_info else 1.0
return rv
def getChainHeight(self):
# get_block_count returns "Internal error" if bootstrap-daemon is active
# return self.rpc_cb('get_info')['height']
# return self.rpc_cb('get_block_count')['count']
return self.rpc_cb2('get_height')['height']
return self.rpc_cb2('get_height', timeout=30)['height']
def getWalletInfo(self):
with self._mx_wallet:
@ -348,7 +351,7 @@ class XMRInterface(CoinInterface):
self.rpc_wallet_cb('refresh')
try:
current_height = self.rpc_cb2('get_height')['height']
current_height = self.rpc_cb2('get_height', timeout=30)['height']
self._log.info('findTxnByHash XMR current_height %d\nhash: %s', current_height, txid)
except Exception as e:
self._log.info('rpc_cb failed %s', str(e))

View file

@ -42,7 +42,7 @@ else:
FILE_EXT = 'tar.gz'
known_coins = {
'particl': ('0.21.2.3', ''),
'particl': ('0.21.2.4', ''),
'litecoin': ('0.18.1', ''),
'bitcoin': ('0.21.1', ''),
'namecoin': ('0.18.0', ''),

View file

@ -149,9 +149,19 @@ class XmrTestBase(unittest.TestCase):
waitForServer(self.delay_event, 12701)
wallets = json.loads(urlopen('http://127.0.0.1:12701/json/wallets').read())
def waitForDepositAddress():
for i in range(20):
if self.delay_event.is_set():
raise ValueError('Test stopped.')
try:
wallets = json.loads(urlopen('http://127.0.0.1:12701/json/wallets').read())
return wallets['6']['deposit_address']
except Exception as e:
print('Waiting for deposit address {}'.format(str(e)))
self.delay_event.wait(1)
raise ValueError('waitForDepositAddress timedout')
xmr_addr1 = waitForDepositAddress()
xmr_addr1 = wallets['6']['deposit_address']
num_blocks = 100
if callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'] < num_blocks:

View file

@ -8,7 +8,7 @@
"""
export TEST_PATH=/tmp/test_basicswap_wallet_init
mkdir -p ${TEST_PATH}/bin/{particl,monero,bitcoin}
cp ~/tmp/particl-0.21.2.3-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/particl
cp ~/tmp/particl-0.21.2.4-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/particl
cp ~/tmp/monero-linux-x64-v0.17.2.3.tar.bz2 ${TEST_PATH}/bin/monero/monero-0.17.2.3-x86_64-linux-gnu.tar.bz2
cp ~/tmp/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/bitcoin
export PYTHONPATH=$(pwd)

View file

@ -9,7 +9,7 @@
export RESET_TEST=true
export TEST_PATH=/tmp/test_persistent
mkdir -p ${TEST_PATH}/bin/{particl,monero,bitcoin}
cp ~/tmp/particl-0.21.2.3-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/particl
cp ~/tmp/particl-0.21.2.4-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/particl
cp ~/tmp/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/bitcoin
cp ~/tmp/monero-linux-x64-v0.17.2.3.tar.bz2 ${TEST_PATH}/bin/monero/monero-0.17.2.3-x86_64-linux-gnu.tar.bz2
export PYTHONPATH=$(pwd)

View file

@ -8,7 +8,7 @@
"""
export TEST_RELOAD_PATH=/tmp/test_basicswap
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,bitcoin}
cp ~/tmp/particl-0.21.2.3-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/particl-0.21.2.4-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/bitcoin
export PYTHONPATH=$(pwd)
python tests/basicswap/test_reload.py

View file

@ -8,7 +8,7 @@
"""
export TEST_RELOAD_PATH=/tmp/test_basicswap
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,monero}
cp ~/tmp/particl-0.21.2.3-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/particl-0.21.2.4-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/monero-linux-x64-v0.17.2.3.tar.bz2 ${TEST_RELOAD_PATH}/bin/monero/monero-0.17.2.3-x86_64-linux-gnu.tar.bz2
export PYTHONPATH=$(pwd)
python tests/basicswap/test_xmr_bids_offline.py

View file

@ -8,7 +8,7 @@
"""
export TEST_RELOAD_PATH=/tmp/test_basicswap
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,monero}
cp ~/tmp/particl-0.21.2.3-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/particl-0.21.2.4-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/particl
cp ~/tmp/monero-linux-x64-v0.17.2.3.tar.bz2 ${TEST_RELOAD_PATH}/bin/monero/monero-0.17.2.3-x86_64-linux-gnu.tar.bz2
export PYTHONPATH=$(pwd)
python tests/basicswap/test_xmr_reload.py