mirror of https://github.com/skygpu/skynet.git
				
				
				
			Init chain with GPU token, tweak dgpu init
							parent
							
								
									0b312ff961
								
							
						
					
					
						commit
						dcd020f0da
					
				| 
						 | 
				
			
			@ -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)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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']
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue