From dcd020f0da1c808ced51dd929284a4a381f730cb Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Wed, 24 May 2023 13:24:46 -0300 Subject: [PATCH] Init chain with GPU token, tweak dgpu init --- skynet/nodeos.py | 4 ++-- tests/conftest.py | 12 ------------ tests/test_deploy.py | 3 +-- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/skynet/nodeos.py b/skynet/nodeos.py index 39f0672..e5089e9 100644 --- a/skynet/nodeos.py +++ b/skynet/nodeos.py @@ -8,7 +8,7 @@ from contextlib import contextmanager as cm import docker from leap.cleos import CLEOS -from leap.sugar import get_container +from leap.sugar import get_container, Symbol @cm @@ -40,7 +40,7 @@ def open_nodeos(cleanup: bool = True): cleos.setup_wallet('5JnvSc6pewpHHuUHwvbJopsew6AKwiGnexwDRc2Pj2tbdw6iML9') cleos.wait_blocks(1) - cleos.boot_sequence() + cleos.boot_sequence(token_sym=Symbol('GPU', 4)) cleos.new_account('telos.gpu', ram=300000) diff --git a/tests/conftest.py b/tests/conftest.py index 8f631c7..8cc392e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,16 +18,4 @@ def postgres_db(): @pytest.fixture(scope='session') def cleos(): with open_nodeos() as cli: - contract_acc = cli.new_account('telos.gpu', ram=300000) - - cli.new_account(name='testworker1') - cli.new_account(name='testworker2') - cli.new_account(name='testworker3') - - cli.deploy_contract_from_host( - 'telos.gpu', - 'tests/contracts/telos.gpu', - verify_hash=False, - create_account=False - ) yield cli diff --git a/tests/test_deploy.py b/tests/test_deploy.py index 5847849..2bea848 100644 --- a/tests/test_deploy.py +++ b/tests/test_deploy.py @@ -12,7 +12,7 @@ import requests from skynet.dgpu import open_dgpu_node -def test_enqueue_work(ipfs_node, cleos): +def test_enqueue_work(cleos): user = cleos.new_account() req = json.dumps({ @@ -55,7 +55,6 @@ def test_enqueue_work(ipfs_node, cleos): f'testworker{i}', 'active', cleos, - ipfs_node, initial_algos=['midj'] ) )