mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
orchstr8 works again, for now...
This commit is contained in:
parent
3ccfc09e01
commit
745031c020
4 changed files with 8 additions and 14 deletions
|
@ -3,8 +3,10 @@ import argparse
|
||||||
import asyncio
|
import asyncio
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from torba.orchstr8.node import Conductor, get_ledger_from_environment, get_blockchain_node_from_ledger
|
from lbry.wallet.orchstr8.node import (
|
||||||
from torba.orchstr8.service import ConductorService
|
Conductor, get_ledger_from_environment, get_blockchain_node_from_ledger
|
||||||
|
)
|
||||||
|
from lbry.wallet.orchstr8.service import ConductorService
|
||||||
|
|
||||||
|
|
||||||
def get_argument_parser():
|
def get_argument_parser():
|
||||||
|
@ -13,8 +15,6 @@ def get_argument_parser():
|
||||||
)
|
)
|
||||||
subparsers = parser.add_subparsers(dest='command', help='sub-command help')
|
subparsers = parser.add_subparsers(dest='command', help='sub-command help')
|
||||||
|
|
||||||
subparsers.add_parser("gui", help="Start Qt GUI.")
|
|
||||||
|
|
||||||
subparsers.add_parser("download", help="Download blockchain node binary.")
|
subparsers.add_parser("download", help="Download blockchain node binary.")
|
||||||
|
|
||||||
start = subparsers.add_parser("start", help="Start orchstr8 service.")
|
start = subparsers.add_parser("start", help="Start orchstr8 service.")
|
||||||
|
@ -41,10 +41,6 @@ def main():
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
command = getattr(args, 'command', 'help')
|
command = getattr(args, 'command', 'help')
|
||||||
|
|
||||||
if command == 'gui':
|
|
||||||
from torba.workbench import main as start_app # pylint: disable=import-outside-toplevel
|
|
||||||
return start_app()
|
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
ledger = get_ledger_from_environment()
|
ledger = get_ledger_from_environment()
|
||||||
|
|
|
@ -31,10 +31,7 @@ def get_manager_from_environment(default_manager=BaseWalletManager):
|
||||||
|
|
||||||
|
|
||||||
def get_ledger_from_environment():
|
def get_ledger_from_environment():
|
||||||
if 'TORBA_LEDGER' not in os.environ:
|
return importlib.import_module('lbry.wallet')
|
||||||
raise ValueError('Environment variable TORBA_LEDGER must point to a torba based ledger module.')
|
|
||||||
module_name = os.environ['TORBA_LEDGER'].split('-')[-1] # tox support
|
|
||||||
return importlib.import_module(module_name)
|
|
||||||
|
|
||||||
|
|
||||||
def get_spvserver_from_ledger(ledger_module):
|
def get_spvserver_from_ledger(ledger_module):
|
||||||
|
|
|
@ -3,8 +3,8 @@ branch = True
|
||||||
|
|
||||||
[coverage:paths]
|
[coverage:paths]
|
||||||
source =
|
source =
|
||||||
torba
|
lbry
|
||||||
.tox/*/lib/python*/site-packages/torba
|
.tox/*/lib/python*/site-packages/lbry
|
||||||
|
|
||||||
[cryptography.*,coincurve.*,pbkdf2]
|
[cryptography.*,coincurve.*,pbkdf2]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
|
@ -29,6 +29,7 @@ setup(
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'lbrynet=lbry.extras.cli:main',
|
'lbrynet=lbry.extras.cli:main',
|
||||||
'torba-server=lbry.wallet.server.cli:main',
|
'torba-server=lbry.wallet.server.cli:main',
|
||||||
|
'orchstr8=lbry.wallet.orchstr8.cli:main',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
|
|
Loading…
Add table
Reference in a new issue