coins: Raise Particl Version
This commit is contained in:
parent
6e82961da9
commit
f9f26c92c2
@ -118,15 +118,18 @@ class XMRInterface(CoinInterface):
|
|||||||
|
|
||||||
# get_block_count returns "Internal error" if bootstrap-daemon is active
|
# get_block_count returns "Internal error" if bootstrap-daemon is active
|
||||||
# rv['blocks'] = self.rpc_cb('get_block_count')['count']
|
# rv['blocks'] = self.rpc_cb('get_block_count')['count']
|
||||||
rv['blocks'] = self.rpc_cb2('get_height')['height']
|
rv['blocks'] = self.rpc_cb2('get_height', timeout=30)['height']
|
||||||
rv['verificationprogress'] = 0 # TODO
|
|
||||||
|
sync_info = self.rpc_cb('sync_info', timeout=30)
|
||||||
|
rv['verificationprogress'] = 0.0 if 'spans' in sync_info else 1.0
|
||||||
|
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
def getChainHeight(self):
|
def getChainHeight(self):
|
||||||
# get_block_count returns "Internal error" if bootstrap-daemon is active
|
# get_block_count returns "Internal error" if bootstrap-daemon is active
|
||||||
# return self.rpc_cb('get_info')['height']
|
# return self.rpc_cb('get_info')['height']
|
||||||
# return self.rpc_cb('get_block_count')['count']
|
# 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):
|
def getWalletInfo(self):
|
||||||
with self._mx_wallet:
|
with self._mx_wallet:
|
||||||
@ -348,7 +351,7 @@ class XMRInterface(CoinInterface):
|
|||||||
self.rpc_wallet_cb('refresh')
|
self.rpc_wallet_cb('refresh')
|
||||||
|
|
||||||
try:
|
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)
|
self._log.info('findTxnByHash XMR current_height %d\nhash: %s', current_height, txid)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._log.info('rpc_cb failed %s', str(e))
|
self._log.info('rpc_cb failed %s', str(e))
|
||||||
|
@ -42,7 +42,7 @@ else:
|
|||||||
FILE_EXT = 'tar.gz'
|
FILE_EXT = 'tar.gz'
|
||||||
|
|
||||||
known_coins = {
|
known_coins = {
|
||||||
'particl': ('0.21.2.3', ''),
|
'particl': ('0.21.2.4', ''),
|
||||||
'litecoin': ('0.18.1', ''),
|
'litecoin': ('0.18.1', ''),
|
||||||
'bitcoin': ('0.21.1', ''),
|
'bitcoin': ('0.21.1', ''),
|
||||||
'namecoin': ('0.18.0', ''),
|
'namecoin': ('0.18.0', ''),
|
||||||
|
@ -149,9 +149,19 @@ class XmrTestBase(unittest.TestCase):
|
|||||||
|
|
||||||
waitForServer(self.delay_event, 12701)
|
waitForServer(self.delay_event, 12701)
|
||||||
|
|
||||||
|
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())
|
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
|
num_blocks = 100
|
||||||
|
|
||||||
if callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'] < num_blocks:
|
if callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'] < num_blocks:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"""
|
"""
|
||||||
export TEST_PATH=/tmp/test_basicswap_wallet_init
|
export TEST_PATH=/tmp/test_basicswap_wallet_init
|
||||||
mkdir -p ${TEST_PATH}/bin/{particl,monero,bitcoin}
|
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/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
|
cp ~/tmp/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz ${TEST_PATH}/bin/bitcoin
|
||||||
export PYTHONPATH=$(pwd)
|
export PYTHONPATH=$(pwd)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
export RESET_TEST=true
|
export RESET_TEST=true
|
||||||
export TEST_PATH=/tmp/test_persistent
|
export TEST_PATH=/tmp/test_persistent
|
||||||
mkdir -p ${TEST_PATH}/bin/{particl,monero,bitcoin}
|
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/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
|
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)
|
export PYTHONPATH=$(pwd)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"""
|
"""
|
||||||
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
||||||
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,bitcoin}
|
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
|
cp ~/tmp/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz ${TEST_RELOAD_PATH}/bin/bitcoin
|
||||||
export PYTHONPATH=$(pwd)
|
export PYTHONPATH=$(pwd)
|
||||||
python tests/basicswap/test_reload.py
|
python tests/basicswap/test_reload.py
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"""
|
"""
|
||||||
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
||||||
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,monero}
|
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
|
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)
|
export PYTHONPATH=$(pwd)
|
||||||
python tests/basicswap/test_xmr_bids_offline.py
|
python tests/basicswap/test_xmr_bids_offline.py
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"""
|
"""
|
||||||
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
export TEST_RELOAD_PATH=/tmp/test_basicswap
|
||||||
mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,monero}
|
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
|
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)
|
export PYTHONPATH=$(pwd)
|
||||||
python tests/basicswap/test_xmr_reload.py
|
python tests/basicswap/test_xmr_reload.py
|
||||||
|
Loading…
Reference in New Issue
Block a user