updated references lbrynet.core -> lbrynet.p2p

This commit is contained in:
Lex Berezhny 2018-11-04 14:06:29 -05:00
parent 8c8f5d8f58
commit f4c6dc90c9
68 changed files with 184 additions and 184 deletions

View file

@ -5,7 +5,7 @@ import treq
from twisted.internet import defer, task from twisted.internet import defer, task
from lbrynet import conf from lbrynet import conf
from lbrynet.core import looping_call_manager, utils, system_info from lbrynet.p2p import looping_call_manager, utils, system_info
# Things We Track # Things We Track
SERVER_STARTUP = 'Server Startup' SERVER_STARTUP = 'Server Startup'

View file

@ -3,8 +3,8 @@ import os
from twisted.internet import defer, threads from twisted.internet import defer, threads
from twisted.web.client import FileBodyProducer from twisted.web.client import FileBodyProducer
from twisted.python.failure import Failure from twisted.python.failure import Failure
from lbrynet.core.Error import DownloadCanceledError, InvalidDataError, InvalidBlobHashError from lbrynet.p2p.Error import DownloadCanceledError, InvalidDataError, InvalidBlobHashError
from lbrynet.core.utils import is_valid_blobhash from lbrynet.p2p.utils import is_valid_blobhash
from lbrynet.blob.writer import HashBlobWriter from lbrynet.blob.writer import HashBlobWriter
from lbrynet.blob.reader import HashBlobReader from lbrynet.blob.reader import HashBlobReader

View file

@ -3,7 +3,7 @@ import logging
from io import BytesIO from io import BytesIO
from twisted.internet import defer from twisted.internet import defer
from twisted.web.client import FileBodyProducer from twisted.web.client import FileBodyProducer
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.p2p.cryptoutils import get_lbry_hash_obj
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -1,8 +1,8 @@
import logging import logging
from io import BytesIO from io import BytesIO
from twisted.python.failure import Failure from twisted.python.failure import Failure
from lbrynet.core.Error import DownloadCanceledError, InvalidDataError from lbrynet.p2p.Error import DownloadCanceledError, InvalidDataError
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.p2p.cryptoutils import get_lbry_hash_obj
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -24,7 +24,7 @@ from lbrynet.extras.daemon.Daemon import Daemon
from lbrynet.extras.daemon.DaemonControl import start as daemon_main from lbrynet.extras.daemon.DaemonControl import start as daemon_main
from lbrynet.extras.daemon.DaemonConsole import main as daemon_console from lbrynet.extras.daemon.DaemonConsole import main as daemon_console
from lbrynet.extras.daemon.auth.client import LBRYAPIClient from lbrynet.extras.daemon.auth.client import LBRYAPIClient
from lbrynet.core.system_info import get_platform from lbrynet.p2p.system_info import get_platform
async def execute_command(method, params, conf_path=None): async def execute_command(method, params, conf_path=None):

View file

@ -7,8 +7,8 @@ import sys
import yaml import yaml
import envparse import envparse
from appdirs import user_data_dir, user_config_dir from appdirs import user_data_dir, user_config_dir
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet.core.Error import InvalidCurrencyError, NoSuchDirectoryError from lbrynet.p2p.Error import InvalidCurrencyError, NoSuchDirectoryError
from lbrynet.androidhelpers.paths import ( from lbrynet.androidhelpers.paths import (
android_internal_storage_dir, android_internal_storage_dir,
android_app_internal_storage_dir android_app_internal_storage_dir

View file

@ -7,7 +7,7 @@ from cryptography.hazmat.primitives.ciphers import Cipher, modes
from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.algorithms import AES
from cryptography.hazmat.primitives.padding import PKCS7 from cryptography.hazmat.primitives.padding import PKCS7
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends import default_backend
from lbrynet.core.BlobInfo import BlobInfo from lbrynet.p2p.BlobInfo import BlobInfo
from lbrynet.blob.blob_file import MAX_BLOB_SIZE from lbrynet.blob.blob_file import MAX_BLOB_SIZE
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -1,9 +1,9 @@
from binascii import unhexlify from binascii import unhexlify
import logging import logging
from lbrynet.core.client.BlobRequester import BlobRequester from lbrynet.p2p.client.BlobRequester import BlobRequester
from lbrynet.core.client.ConnectionManager import ConnectionManager from lbrynet.p2p.client.ConnectionManager import ConnectionManager
from lbrynet.core.client.DownloadManager import DownloadManager from lbrynet.p2p.client.DownloadManager import DownloadManager
from lbrynet.core.client.StreamProgressManager import FullStreamProgressManager from lbrynet.p2p.client.StreamProgressManager import FullStreamProgressManager
from lbrynet.cryptstream.client.CryptBlobHandler import CryptBlobHandler from lbrynet.cryptstream.client.CryptBlobHandler import CryptBlobHandler
from twisted.internet import defer from twisted.internet import defer
from twisted.python.failure import Failure from twisted.python.failure import Failure

View file

@ -2,7 +2,7 @@ import binascii
import logging import logging
from twisted.internet import defer, task from twisted.internet import defer, task
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet import conf from lbrynet import conf
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -7,7 +7,7 @@
# The docstrings in this module contain epytext markup; API documentation # The docstrings in this module contain epytext markup; API documentation
# may be created by processing this file with epydoc: http://epydoc.sf.net # may be created by processing this file with epydoc: http://epydoc.sf.net
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
from . import constants from . import constants

View file

@ -5,9 +5,9 @@ from functools import reduce
from twisted.internet import defer, error, task from twisted.internet import defer, error, task
from lbrynet.core.utils import generate_id, DeferredDict from lbrynet.p2p.utils import generate_id, DeferredDict
from lbrynet.core.call_later_manager import CallLaterManager from lbrynet.p2p.call_later_manager import CallLaterManager
from lbrynet.core.PeerManager import PeerManager from lbrynet.p2p.PeerManager import PeerManager
from .error import TimeoutError from .error import TimeoutError
from . import constants from . import constants
from . import routingtable from . import routingtable
@ -580,7 +580,7 @@ class Node(MockKademliaHelper):
""" """
return generate_id() return generate_id()
# from lbrynet.core.utils import profile_deferred # from lbrynet.p2p.utils import profile_deferred
# @profile_deferred() # @profile_deferred()
@defer.inlineCallbacks @defer.inlineCallbacks
def _iterativeFind(self, key, startupShortlist=None, rpc='findNode', exclude=None): def _iterativeFind(self, key, startupShortlist=None, rpc='findNode', exclude=None):

View file

@ -1,7 +1,7 @@
import logging import logging
from twisted.internet import defer from twisted.internet import defer
from lbrynet.core.Error import ComponentStartConditionNotMet from lbrynet.p2p.Error import ComponentStartConditionNotMet
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -12,15 +12,15 @@ from aioupnp import __version__ as aioupnp_version
from aioupnp.upnp import UPnP from aioupnp.upnp import UPnP
from aioupnp.fault import UPnPError from aioupnp.fault import UPnPError
from lbrynet import conf from lbrynet import conf
from lbrynet.core.utils import DeferredDict from lbrynet.p2p.utils import DeferredDict
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from lbrynet.core.RateLimiter import RateLimiter from lbrynet.p2p.RateLimiter import RateLimiter
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier, EncryptedFileStreamType from lbrynet.p2p.StreamDescriptor import StreamDescriptorIdentifier, EncryptedFileStreamType
from lbrynet.extras.wallet import LbryWalletManager from lbrynet.extras.wallet import LbryWalletManager
from lbrynet.extras.wallet import Network from lbrynet.extras.wallet import Network
from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory from lbrynet.p2p.server.BlobRequestHandler import BlobRequestHandlerFactory
from lbrynet.core.server.ServerProtocol import ServerProtocolFactory from lbrynet.p2p.server.ServerProtocol import ServerProtocolFactory
from .Component import Component from .Component import Component
from .ExchangeRateManager import ExchangeRateManager from .ExchangeRateManager import ExchangeRateManager
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
@ -30,7 +30,7 @@ from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaverF
from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier
from lbrynet.extras.reflector import ServerFactory as reflector_server_factory from lbrynet.extras.reflector import ServerFactory as reflector_server_factory
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -95,7 +95,7 @@ class ConfigSettings:
@staticmethod @staticmethod
def get_external_ip(): def get_external_ip():
from lbrynet.core.system_info import get_platform from lbrynet.p2p.system_info import get_platform
platform = get_platform(get_ip=True) platform = get_platform(get_ip=True)
return platform['ip'] return platform['ip']

View file

@ -25,7 +25,7 @@ from lbrynet.schema.address import decode_address
from lbrynet.schema.decode import smart_decode from lbrynet.schema.decode import smart_decode
# TODO: importing this when internet is disabled raises a socket.gaierror # TODO: importing this when internet is disabled raises a socket.gaierror
from lbrynet.core.system_info import get_lbrynet_version from lbrynet.p2p.system_info import get_lbrynet_version
from lbrynet import conf from lbrynet import conf
from lbrynet.extras.reflector import reupload from lbrynet.extras.reflector import reupload
from .Components import d2f, f2d from .Components import d2f, f2d
@ -36,16 +36,16 @@ from .ComponentManager import RequiredCondition
from .Downloader import GetStream from .Downloader import GetStream
from .Publisher import Publisher from .Publisher import Publisher
from .auth.server import AuthJSONRPCServer from .auth.server import AuthJSONRPCServer
from lbrynet.core import utils, system_info from lbrynet.p2p import utils, system_info
from lbrynet.core.StreamDescriptor import download_sd_blob from lbrynet.p2p.StreamDescriptor import download_sd_blob
from lbrynet.core.Error import InsufficientFundsError, UnknownNameError from lbrynet.p2p.Error import InsufficientFundsError, UnknownNameError
from lbrynet.core.Error import DownloadDataTimeout, DownloadSDTimeout from lbrynet.p2p.Error import DownloadDataTimeout, DownloadSDTimeout
from lbrynet.core.Error import NullFundsError, NegativeFundsError from lbrynet.p2p.Error import NullFundsError, NegativeFundsError
from lbrynet.core.Error import ResolveError from lbrynet.p2p.Error import ResolveError
from lbrynet.dht.error import TimeoutError from lbrynet.dht.error import TimeoutError
from lbrynet.core.Peer import Peer from lbrynet.p2p.Peer import Peer
from lbrynet.core.SinglePeerDownloader import SinglePeerDownloader from lbrynet.p2p.SinglePeerDownloader import SinglePeerDownloader
from lbrynet.core.client.StandaloneBlobDownloader import StandaloneBlobDownloader from lbrynet.p2p.client.StandaloneBlobDownloader import StandaloneBlobDownloader
from lbrynet.extras.wallet import LbryWalletManager from lbrynet.extras.wallet import LbryWalletManager
from lbrynet.extras.wallet.account import Account as LBCAccount from lbrynet.extras.wallet.account import Account as LBCAccount
from lbrynet.extras.wallet.dewies import dewies_to_lbc, lbc_to_dewies from lbrynet.extras.wallet.dewies import dewies_to_lbc, lbc_to_dewies

View file

@ -8,8 +8,8 @@ from aiohttp import client_exceptions
from lbrynet import analytics from lbrynet import analytics
from lbrynet import conf from lbrynet import conf
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet.core import log_support from lbrynet.p2p import log_support
from .auth.client import LBRYAPIClient from .auth.client import LBRYAPIClient
from .Daemon import Daemon from .Daemon import Daemon

View file

@ -7,7 +7,7 @@ if 'win' in sys.platform:
import certifi import certifi
os.environ['SSL_CERT_FILE'] = certifi.where() os.environ['SSL_CERT_FILE'] = certifi.where()
from lbrynet.core import log_support from lbrynet.p2p import log_support
import argparse import argparse
import logging.handlers import logging.handlers
@ -15,7 +15,7 @@ import logging.handlers
from twisted.internet import reactor from twisted.internet import reactor
from lbrynet import conf from lbrynet import conf
from lbrynet.core import utils, system_info from lbrynet.p2p import utils, system_info
from .Daemon import Daemon from .Daemon import Daemon
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -6,10 +6,10 @@ from twisted.internet.task import LoopingCall
from .Components import f2d from .Components import f2d
from lbrynet.schema.fee import Fee from lbrynet.schema.fee import Fee
from lbrynet.core.Error import InsufficientFundsError, KeyFeeAboveMaxAllowed, InvalidStreamDescriptorError from lbrynet.p2p.Error import InsufficientFundsError, KeyFeeAboveMaxAllowed, InvalidStreamDescriptorError
from lbrynet.core.Error import DownloadDataTimeout, DownloadCanceledError, DownloadSDTimeout from lbrynet.p2p.Error import DownloadDataTimeout, DownloadCanceledError, DownloadSDTimeout
from lbrynet.core.utils import safe_start_looping_call, safe_stop_looping_call from lbrynet.p2p.utils import safe_start_looping_call, safe_stop_looping_call
from lbrynet.core.StreamDescriptor import download_sd_blob from lbrynet.p2p.StreamDescriptor import download_sd_blob
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory
from lbrynet import conf from lbrynet import conf
from torba.client.constants import COIN from torba.client.constants import COIN

View file

@ -6,7 +6,7 @@ import treq
from twisted.internet import defer from twisted.internet import defer
from twisted.internet.task import LoopingCall from twisted.internet.task import LoopingCall
from lbrynet.core.Error import InvalidExchangeRateResponse, CurrencyConversionError from lbrynet.p2p.Error import InvalidExchangeRateResponse, CurrencyConversionError
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -15,10 +15,10 @@ from txjsonrpc import jsonrpclib
from traceback import format_exc from traceback import format_exc
from lbrynet import conf, analytics from lbrynet import conf, analytics
from lbrynet.core.Error import InvalidAuthenticationToken from lbrynet.p2p.Error import InvalidAuthenticationToken
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet.core.Error import ComponentsNotStarted, ComponentStartConditionNotMet from lbrynet.p2p.Error import ComponentsNotStarted, ComponentStartConditionNotMet
from lbrynet.core.looping_call_manager import LoopingCallManager from lbrynet.p2p.looping_call_manager import LoopingCallManager
from lbrynet.extras.daemon.ComponentManager import ComponentManager from lbrynet.extras.daemon.ComponentManager import ComponentManager
from .keyring import APIKey, Keyring from .keyring import APIKey, Keyring
from .undecorated import undecorated from .undecorated import undecorated

View file

@ -2,8 +2,8 @@ import sqlite3
import logging import logging
import os import os
from lbrynet.core.Error import InvalidStreamDescriptorError from lbrynet.p2p.Error import InvalidStreamDescriptorError
from lbrynet.core.StreamDescriptor import EncryptedFileStreamType, format_sd_info, format_blobs, validate_descriptor from lbrynet.p2p.StreamDescriptor import EncryptedFileStreamType, format_sd_info, format_blobs, validate_descriptor
from lbrynet.cryptstream.CryptBlob import CryptBlobInfo from lbrynet.cryptstream.CryptBlob import CryptBlobInfo
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -3,10 +3,10 @@ import json
from twisted.python import failure from twisted.python import failure
from twisted.internet import error, defer from twisted.internet import error, defer
from twisted.internet.protocol import Protocol, ServerFactory from twisted.internet.protocol import Protocol, ServerFactory
from lbrynet.core.utils import is_valid_blobhash from lbrynet.p2p.utils import is_valid_blobhash
from lbrynet.core.Error import DownloadCanceledError, InvalidBlobHashError from lbrynet.p2p.Error import DownloadCanceledError, InvalidBlobHashError
from lbrynet.core.StreamDescriptor import BlobStreamDescriptorReader from lbrynet.p2p.StreamDescriptor import BlobStreamDescriptorReader
from lbrynet.core.StreamDescriptor import save_sd_info from lbrynet.p2p.StreamDescriptor import save_sd_info
from lbrynet.extras.reflector.common import REFLECTOR_V1, REFLECTOR_V2 from lbrynet.extras.reflector.common import REFLECTOR_V1, REFLECTOR_V2
from lbrynet.extras.reflector.common import ReflectorRequestError, ReflectorClientVersionError from lbrynet.extras.reflector.common import ReflectorRequestError, ReflectorClientVersionError

View file

@ -3,7 +3,7 @@ import logging
from ecdsa import BadSignatureError from ecdsa import BadSignatureError
from binascii import unhexlify, hexlify from binascii import unhexlify, hexlify
from lbrynet.core.Error import UnknownNameError, UnknownClaimID, UnknownURI, UnknownOutpoint from lbrynet.p2p.Error import UnknownNameError, UnknownClaimID, UnknownURI, UnknownOutpoint
from lbrynet.schema.address import is_address from lbrynet.schema.address import is_address
from lbrynet.schema.claim import ClaimDict from lbrynet.schema.claim import ClaimDict
from lbrynet.schema.decode import smart_decode from lbrynet.schema.decode import smart_decode

View file

@ -9,8 +9,8 @@ from binascii import hexlify
from twisted.internet import defer from twisted.internet import defer
from twisted.protocols.basic import FileSender from twisted.protocols.basic import FileSender
from lbrynet.core.StreamDescriptor import BlobStreamDescriptorWriter, EncryptedFileStreamType from lbrynet.p2p.StreamDescriptor import BlobStreamDescriptorWriter, EncryptedFileStreamType
from lbrynet.core.StreamDescriptor import format_sd_info, get_stream_hash, validate_descriptor from lbrynet.p2p.StreamDescriptor import format_sd_info, get_stream_hash, validate_descriptor
from lbrynet.cryptstream.CryptStreamCreator import CryptStreamCreator from lbrynet.cryptstream.CryptStreamCreator import CryptStreamCreator
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -6,13 +6,13 @@ from binascii import hexlify, unhexlify
from twisted.internet import defer from twisted.internet import defer
from lbrynet import conf from lbrynet import conf
from lbrynet.core.client.StreamProgressManager import FullStreamProgressManager from lbrynet.p2p.client.StreamProgressManager import FullStreamProgressManager
from lbrynet.core.HTTPBlobDownloader import HTTPBlobDownloader from lbrynet.p2p.HTTPBlobDownloader import HTTPBlobDownloader
from lbrynet.core.utils import short_hash from lbrynet.p2p.utils import short_hash
from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaver from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaver
from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileDownloader from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileDownloader
from lbrynet.file_manager.EncryptedFileStatusReport import EncryptedFileStatusReport from lbrynet.file_manager.EncryptedFileStatusReport import EncryptedFileStatusReport
from lbrynet.core.StreamDescriptor import save_sd_info from lbrynet.p2p.StreamDescriptor import save_sd_info
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -10,10 +10,10 @@ from twisted.python.failure import Failure
from lbrynet.extras.reflector.reupload import reflect_file from lbrynet.extras.reflector.reupload import reflect_file
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader
from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory
from lbrynet.core.StreamDescriptor import EncryptedFileStreamType, get_sd_info from lbrynet.p2p.StreamDescriptor import EncryptedFileStreamType, get_sd_info
from lbrynet.cryptstream.client.CryptStreamDownloader import AlreadyStoppedError from lbrynet.cryptstream.client.CryptStreamDownloader import AlreadyStoppedError
from lbrynet.cryptstream.client.CryptStreamDownloader import CurrentlyStoppingError from lbrynet.cryptstream.client.CryptStreamDownloader import CurrentlyStoppingError
from lbrynet.core.utils import safe_start_looping_call, safe_stop_looping_call from lbrynet.p2p.utils import safe_start_looping_call, safe_stop_looping_call
from lbrynet import conf from lbrynet import conf

View file

@ -3,10 +3,10 @@ import logging
import traceback import traceback
from binascii import hexlify, unhexlify from binascii import hexlify, unhexlify
from lbrynet.core.StreamDescriptor import save_sd_info from lbrynet.p2p.StreamDescriptor import save_sd_info
from lbrynet.cryptstream.client.CryptStreamDownloader import CryptStreamDownloader from lbrynet.cryptstream.client.CryptStreamDownloader import CryptStreamDownloader
from lbrynet.core.client.StreamProgressManager import FullStreamProgressManager from lbrynet.p2p.client.StreamProgressManager import FullStreamProgressManager
from lbrynet.core.Error import FileOpenError from lbrynet.p2p.Error import FileOpenError
from lbrynet.lbry_file.client.EncryptedFileMetadataHandler import EncryptedFileMetadataHandler from lbrynet.lbry_file.client.EncryptedFileMetadataHandler import EncryptedFileMetadataHandler
from twisted.internet import defer, threads from twisted.internet import defer, threads

View file

@ -1,6 +1,6 @@
from lbrynet.core.StreamDescriptor import EncryptedFileStreamType from lbrynet.p2p.StreamDescriptor import EncryptedFileStreamType
from lbrynet.core.StreamDescriptor import EncryptedFileStreamDescriptorValidator from lbrynet.p2p.StreamDescriptor import EncryptedFileStreamDescriptorValidator
from lbrynet.core.DownloadOption import DownloadOption, DownloadOptionChoice from lbrynet.p2p.DownloadOption import DownloadOption, DownloadOptionChoice
def add_lbry_file_to_sd_identifier(sd_identifier): def add_lbry_file_to_sd_identifier(sd_identifier):

View file

@ -4,8 +4,8 @@ from twisted.internet import defer, task
from twisted.internet.error import ConnectingCancelledError from twisted.internet.error import ConnectingCancelledError
from twisted.web._newclient import ResponseNeverReceived from twisted.web._newclient import ResponseNeverReceived
import treq import treq
from lbrynet.core.utils import DeferredDict from lbrynet.p2p.utils import DeferredDict
from lbrynet.core.Error import DownloadCanceledError from lbrynet.p2p.Error import DownloadCanceledError
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -1,4 +1,4 @@
from lbrynet.core.Strategy import get_default_strategy, OnlyFreeStrategy from lbrynet.p2p.Strategy import get_default_strategy, OnlyFreeStrategy
from lbrynet import conf from lbrynet import conf
from decimal import Decimal from decimal import Decimal

View file

@ -1,6 +1,6 @@
import datetime import datetime
from collections import defaultdict from collections import defaultdict
from lbrynet.core import utils from lbrynet.p2p import utils
# Do not create this object except through PeerManager # Do not create this object except through PeerManager
class Peer: class Peer:

View file

@ -1,4 +1,4 @@
from lbrynet.core.Peer import Peer from lbrynet.p2p.Peer import Peer
class PeerManager: class PeerManager:

View file

@ -5,12 +5,12 @@ import tempfile
from twisted.internet import defer, threads, reactor from twisted.internet import defer, threads, reactor
from lbrynet.blob import BlobFile from lbrynet.blob import BlobFile
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.p2p.RateLimiter import DummyRateLimiter
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from lbrynet.core.client.BlobRequester import BlobRequester from lbrynet.p2p.client.BlobRequester import BlobRequester
from lbrynet.core.client.StandaloneBlobDownloader import StandaloneBlobDownloader from lbrynet.p2p.client.StandaloneBlobDownloader import StandaloneBlobDownloader
from lbrynet.core.client.ConnectionManager import ConnectionManager from lbrynet.p2p.client.ConnectionManager import ConnectionManager
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.dht.peerfinder import DummyPeerFinder from lbrynet.dht.peerfinder import DummyPeerFinder

View file

@ -2,8 +2,8 @@ from zope.interface import implementer
from decimal import Decimal from decimal import Decimal
from lbrynet import conf from lbrynet import conf
from lbrynet.interfaces import INegotiationStrategy from lbrynet.interfaces import INegotiationStrategy
from lbrynet.core.Offer import Offer from lbrynet.p2p.Offer import Offer
from lbrynet.core.PriceModel import MeanAvailabilityWeightedPrice, ZeroPrice from lbrynet.p2p.PriceModel import MeanAvailabilityWeightedPrice, ZeroPrice
def get_default_strategy(blob_tracker, **kwargs): def get_default_strategy(blob_tracker, **kwargs):

View file

@ -5,10 +5,10 @@ import json
import logging import logging
from twisted.internet import threads, defer from twisted.internet import threads, defer
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.p2p.cryptoutils import get_lbry_hash_obj
from lbrynet.core.client.StandaloneBlobDownloader import StandaloneBlobDownloader from lbrynet.p2p.client.StandaloneBlobDownloader import StandaloneBlobDownloader
from lbrynet.core.Error import UnknownStreamTypeError, InvalidStreamDescriptorError from lbrynet.p2p.Error import UnknownStreamTypeError, InvalidStreamDescriptorError
from lbrynet.core.HTTPBlobDownloader import HTTPBlobDownloader from lbrynet.p2p.HTTPBlobDownloader import HTTPBlobDownloader
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -6,11 +6,11 @@ from twisted.internet import defer
from twisted.python.failure import Failure from twisted.python.failure import Failure
from twisted.internet.error import ConnectionAborted from twisted.internet.error import ConnectionAborted
from lbrynet.core.Error import ConnectionClosedBeforeResponseError from lbrynet.p2p.Error import ConnectionClosedBeforeResponseError
from lbrynet.core.Error import InvalidResponseError, RequestCanceledError, NoResponseError from lbrynet.p2p.Error import InvalidResponseError, RequestCanceledError, NoResponseError
from lbrynet.core.Error import PriceDisagreementError, DownloadCanceledError, InsufficientFundsError from lbrynet.p2p.Error import PriceDisagreementError, DownloadCanceledError, InsufficientFundsError
from lbrynet.core.client.ClientRequest import ClientRequest, ClientBlobRequest from lbrynet.p2p.client.ClientRequest import ClientRequest, ClientBlobRequest
from lbrynet.core.Offer import Offer from lbrynet.p2p.Offer import Offer
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -6,10 +6,10 @@ from twisted.internet.protocol import Protocol, ClientFactory
from twisted.protocols.policies import TimeoutMixin from twisted.protocols.policies import TimeoutMixin
from twisted.python import failure from twisted.python import failure
from lbrynet import conf from lbrynet import conf
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet.core.Error import ConnectionClosedBeforeResponseError, NoResponseError from lbrynet.p2p.Error import ConnectionClosedBeforeResponseError, NoResponseError
from lbrynet.core.Error import DownloadCanceledError, MisbehavingPeerError from lbrynet.p2p.Error import DownloadCanceledError, MisbehavingPeerError
from lbrynet.core.Error import RequestCanceledError from lbrynet.p2p.Error import RequestCanceledError
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -2,9 +2,9 @@ import random
import logging import logging
from twisted.internet import defer, reactor from twisted.internet import defer, reactor
from lbrynet import conf from lbrynet import conf
from lbrynet.core.client.ClientProtocol import ClientProtocolFactory from lbrynet.p2p.client.ClientProtocol import ClientProtocolFactory
from lbrynet.core.Error import InsufficientFundsError from lbrynet.p2p.Error import InsufficientFundsError
from lbrynet.core import utils from lbrynet.p2p import utils
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -1,10 +1,10 @@
import logging import logging
from lbrynet.core.BlobInfo import BlobInfo from lbrynet.p2p.BlobInfo import BlobInfo
from lbrynet.core.client.BlobRequester import BlobRequester from lbrynet.p2p.client.BlobRequester import BlobRequester
from lbrynet.core.client.ConnectionManager import ConnectionManager from lbrynet.p2p.client.ConnectionManager import ConnectionManager
from lbrynet.core.client.DownloadManager import DownloadManager from lbrynet.p2p.client.DownloadManager import DownloadManager
from lbrynet.core.Error import InvalidBlobHashError, DownloadSDTimeout from lbrynet.p2p.Error import InvalidBlobHashError, DownloadSDTimeout
from lbrynet.core.utils import is_valid_blobhash, safe_start_looping_call, safe_stop_looping_call from lbrynet.p2p.utils import is_valid_blobhash, safe_start_looping_call, safe_stop_looping_call
from twisted.python.failure import Failure from twisted.python.failure import Failure
from twisted.internet import defer from twisted.internet import defer
from twisted.internet.task import LoopingCall from twisted.internet.task import LoopingCall

View file

@ -9,7 +9,7 @@ from twisted.internet import defer
import twisted.python.log import twisted.python.log
from lbrynet import __version__ as lbrynet_version, build_type, conf from lbrynet import __version__ as lbrynet_version, build_type, conf
from lbrynet.core import utils from lbrynet.p2p import utils
class HTTPSHandler(logging.Handler): class HTTPSHandler(logging.Handler):

View file

@ -5,7 +5,7 @@ from twisted.protocols.basic import FileSender
from twisted.python.failure import Failure from twisted.python.failure import Failure
from lbrynet import analytics from lbrynet import analytics
from lbrynet.core.Offer import Offer from lbrynet.p2p.Offer import Offer
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -2,7 +2,7 @@ import logging
from twisted.internet import error from twisted.internet import error
from twisted.internet.protocol import Protocol, ServerFactory from twisted.internet.protocol import Protocol, ServerFactory
from twisted.python import failure from twisted.python import failure
from lbrynet.core.server.ServerRequestHandler import ServerRequestHandler from lbrynet.p2p.server.ServerRequestHandler import ServerRequestHandler
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -12,7 +12,7 @@ import pkg_resources
from twisted.python.failure import Failure from twisted.python.failure import Failure
from twisted.internet import defer from twisted.internet import defer
from lbrynet.schema.claim import ClaimDict from lbrynet.schema.claim import ClaimDict
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.p2p.cryptoutils import get_lbry_hash_obj
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -3,7 +3,7 @@ from binascii import hexlify
from twisted.internet import defer from twisted.internet import defer
from lbrynet.dht import constants from lbrynet.dht import constants
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
from .dht_test_environment import TestKademliaBase from .dht_test_environment import TestKademliaBase
import logging import logging

View file

@ -3,15 +3,15 @@ from hashlib import md5
from twisted.internet import defer, reactor from twisted.internet import defer, reactor
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet import conf from lbrynet import conf
from lbrynet.core.server.BlobAvailabilityHandler import BlobAvailabilityHandlerFactory from lbrynet.p2p.server.BlobAvailabilityHandler import BlobAvailabilityHandlerFactory
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.p2p.StreamDescriptor import StreamDescriptorIdentifier
from lbrynet.core.StreamDescriptor import download_sd_blob from lbrynet.p2p.StreamDescriptor import download_sd_blob
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.PeerManager import PeerManager from lbrynet.p2p.PeerManager import PeerManager
from lbrynet.core.RateLimiter import RateLimiter from lbrynet.p2p.RateLimiter import RateLimiter
from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory from lbrynet.p2p.server.BlobRequestHandler import BlobRequestHandlerFactory
from lbrynet.core.server.ServerProtocol import ServerProtocolFactory from lbrynet.p2p.server.ServerProtocol import ServerProtocolFactory
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.file_manager.EncryptedFileCreator import create_lbry_file from lbrynet.file_manager.EncryptedFileCreator import create_lbry_file
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager

View file

@ -3,15 +3,15 @@ from binascii import hexlify
from twisted.internet import defer, error from twisted.internet import defer, error
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet.core.StreamDescriptor import get_sd_info from lbrynet.p2p.StreamDescriptor import get_sd_info
from lbrynet.extras import reflector from lbrynet.extras import reflector
from lbrynet.core import BlobManager, PeerManager from lbrynet.p2p import BlobManager, PeerManager
from lbrynet.core import StreamDescriptor from lbrynet.p2p import StreamDescriptor
from lbrynet.file_manager import EncryptedFileCreator from lbrynet.file_manager import EncryptedFileCreator
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.p2p.RateLimiter import DummyRateLimiter
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from tests import mocks from tests import mocks
from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir

View file

@ -4,13 +4,13 @@ import tempfile
from hashlib import md5 from hashlib import md5
from twisted.trial.unittest import TestCase from twisted.trial.unittest import TestCase
from twisted.internet import defer, threads from twisted.internet import defer, threads
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.p2p.StreamDescriptor import StreamDescriptorIdentifier
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.StreamDescriptor import get_sd_info from lbrynet.p2p.StreamDescriptor import get_sd_info
from lbrynet.core.PeerManager import PeerManager from lbrynet.p2p.PeerManager import PeerManager
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.p2p.RateLimiter import DummyRateLimiter
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from lbrynet.file_manager.EncryptedFileCreator import create_lbry_file from lbrynet.file_manager.EncryptedFileCreator import create_lbry_file
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
from tests import mocks from tests import mocks

View file

@ -116,7 +116,7 @@ class CommandTestCase(IntegrationTestCase):
async def setUp(self): async def setUp(self):
await super().setUp() await super().setUp()
logging.getLogger('lbrynet.core').setLevel(self.VERBOSITY) logging.getLogger('lbrynet.p2p').setLevel(self.VERBOSITY)
logging.getLogger('lbrynet.daemon').setLevel(self.VERBOSITY) logging.getLogger('lbrynet.daemon').setLevel(self.VERBOSITY)
lbry_conf.settings = None lbry_conf.settings = None

View file

@ -8,9 +8,9 @@ from cryptography.hazmat.primitives import serialization
from twisted.internet import defer from twisted.internet import defer
from twisted.python.failure import Failure from twisted.python.failure import Failure
from lbrynet.core.client.ClientRequest import ClientRequest from lbrynet.p2p.client.ClientRequest import ClientRequest
from lbrynet.core.Error import RequestCanceledError from lbrynet.p2p.Error import RequestCanceledError
from lbrynet.core import BlobAvailability from lbrynet.p2p import BlobAvailability
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
from lbrynet.dht.node import Node as RealNode from lbrynet.dht.node import Node as RealNode
from lbrynet.extras.daemon import ExchangeRateManager as ERM from lbrynet.extras.daemon import ExchangeRateManager as ERM

View file

@ -1,17 +1,17 @@
from lbrynet.core.client.ClientRequest import ClientRequest from lbrynet.p2p.client.ClientRequest import ClientRequest
from lbrynet.core.server.ServerProtocol import ServerProtocol from lbrynet.p2p.server.ServerProtocol import ServerProtocol
from lbrynet.core.client.ClientProtocol import ClientProtocol from lbrynet.p2p.client.ClientProtocol import ClientProtocol
from lbrynet.core.RateLimiter import RateLimiter from lbrynet.p2p.RateLimiter import RateLimiter
from lbrynet.core.Peer import Peer from lbrynet.p2p.Peer import Peer
from lbrynet.core.PeerManager import PeerManager from lbrynet.p2p.PeerManager import PeerManager
from lbrynet.core.Error import NoResponseError from lbrynet.p2p.Error import NoResponseError
from twisted.trial.unittest import TestCase from twisted.trial.unittest import TestCase
from twisted.internet import defer, reactor, task from twisted.internet import defer, reactor, task
from twisted.internet.task import deferLater from twisted.internet.task import deferLater
from twisted.internet.protocol import ServerFactory from twisted.internet.protocol import ServerFactory
from lbrynet import conf from lbrynet import conf
from lbrynet.core import utils from lbrynet.p2p import utils
PEER_PORT = 5551 PEER_PORT = 5551
LOCAL_HOST = '127.0.0.1' LOCAL_HOST = '127.0.0.1'
@ -131,7 +131,7 @@ class TestIntegrationConnectionManager(TestCase):
def _init_connection_manager(self, seek_head_blob_first=False): def _init_connection_manager(self, seek_head_blob_first=False):
# this import is required here so utils.call_later is replaced by self.clock.callLater # this import is required here so utils.call_later is replaced by self.clock.callLater
from lbrynet.core.client.ConnectionManager import ConnectionManager from lbrynet.p2p.client.ConnectionManager import ConnectionManager
self.connection_manager = ConnectionManager(self.downloader, self.rate_limiter, self.connection_manager = ConnectionManager(self.downloader, self.rate_limiter,
[self.primary_request_creator], []) [self.primary_request_creator], [])
self.connection_manager.seek_head_blob_first = seek_head_blob_first self.connection_manager.seek_head_blob_first = seek_head_blob_first

View file

@ -5,9 +5,9 @@ from twisted.internet import defer
from twisted.test import proto_helpers from twisted.test import proto_helpers
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet.core import Peer from lbrynet.p2p import Peer
from lbrynet.core.server import BlobRequestHandler from lbrynet.p2p.server import BlobRequestHandler
from lbrynet.core.PaymentRateManager import NegotiatedPaymentRateManager, BasePaymentRateManager from lbrynet.p2p.PaymentRateManager import NegotiatedPaymentRateManager, BasePaymentRateManager
from tests.mocks import BlobAvailabilityTracker as DummyBlobAvailabilityTracker, mock_conf_settings from tests.mocks import BlobAvailabilityTracker as DummyBlobAvailabilityTracker, mock_conf_settings

View file

@ -7,11 +7,11 @@ from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from tests.util import random_lbry_hash from tests.util import random_lbry_hash
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.core.Peer import Peer from lbrynet.p2p.Peer import Peer
from lbrynet import conf from lbrynet import conf
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.p2p.cryptoutils import get_lbry_hash_obj
class BlobManagerTest(unittest.TestCase): class BlobManagerTest(unittest.TestCase):

View file

@ -4,7 +4,7 @@ from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from lbrynet.blob import BlobFile from lbrynet.blob import BlobFile
from lbrynet.core.HTTPBlobDownloader import HTTPBlobDownloader from lbrynet.p2p.HTTPBlobDownloader import HTTPBlobDownloader
from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir

View file

@ -1,5 +1,5 @@
from lbrynet.blob import BlobFile from lbrynet.blob import BlobFile
from lbrynet.core.Error import DownloadCanceledError, InvalidDataError from lbrynet.p2p.Error import DownloadCanceledError, InvalidDataError
from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir, random_lbry_hash from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir, random_lbry_hash
from twisted.trial import unittest from twisted.trial import unittest

View file

@ -2,9 +2,9 @@ import itertools
from twisted.trial import unittest from twisted.trial import unittest
import random import random
import mock import mock
from lbrynet.core.PaymentRateManager import NegotiatedPaymentRateManager, BasePaymentRateManager from lbrynet.p2p.PaymentRateManager import NegotiatedPaymentRateManager, BasePaymentRateManager
from lbrynet.core.Strategy import BasicAvailabilityWeightedStrategy from lbrynet.p2p.Strategy import BasicAvailabilityWeightedStrategy
from lbrynet.core.Offer import Offer from lbrynet.p2p.Offer import Offer
from tests.mocks\ from tests.mocks\
import BlobAvailabilityTracker as DummyBlobAvailabilityTracker, mock_conf_settings import BlobAvailabilityTracker as DummyBlobAvailabilityTracker, mock_conf_settings

View file

@ -4,8 +4,8 @@ import tempfile
from decimal import Decimal from decimal import Decimal
from twisted.trial import unittest from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from lbrynet.core.Error import InsufficientFundsError from lbrynet.p2p.Error import InsufficientFundsError
#from lbrynet.core.Wallet import LBRYumWallet, ReservedPoints #from lbrynet.p2p.Wallet import LBRYumWallet, ReservedPoints
#from lbryum.commands import Commands #from lbryum.commands import Commands
#from lbryum.simple_config import SimpleConfig #from lbryum.simple_config import SimpleConfig
from lbrynet.schema.claim import ClaimDict from lbrynet.schema.claim import ClaimDict

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from lbrynet.core import utils from lbrynet.p2p import utils
from twisted.trial import unittest from twisted.trial import unittest

View file

@ -1,7 +1,7 @@
from binascii import hexlify from binascii import hexlify
from twisted.internet import task from twisted.internet import task
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
from lbrynet.dht.contact import ContactManager from lbrynet.dht.contact import ContactManager
from lbrynet.dht import constants from lbrynet.dht import constants

View file

@ -1,7 +1,7 @@
from twisted.trial import unittest from twisted.trial import unittest
from twisted.internet import defer, task from twisted.internet import defer, task
from lbrynet import conf from lbrynet import conf
from lbrynet.core import utils from lbrynet.p2p import utils
from lbrynet.dht.hashannouncer import DHTHashAnnouncer from lbrynet.dht.hashannouncer import DHTHashAnnouncer
from tests.util import random_lbry_hash from tests.util import random_lbry_hash
from tests.mocks import mock_conf_settings from tests.mocks import mock_conf_settings

View file

@ -6,7 +6,7 @@
from twisted.trial import unittest from twisted.trial import unittest
import struct import struct
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
from lbrynet.dht import kbucket from lbrynet.dht import kbucket
from lbrynet.dht.contact import ContactManager from lbrynet.dht.contact import ContactManager
from lbrynet.dht import constants from lbrynet.dht import constants

View file

@ -5,7 +5,7 @@ from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from lbrynet.dht.node import Node from lbrynet.dht.node import Node
from lbrynet.dht import constants from lbrynet.dht import constants
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
class NodeIDTest(unittest.TestCase): class NodeIDTest(unittest.TestCase):

View file

@ -6,7 +6,7 @@ from lbrynet.dht import constants
from lbrynet.dht.routingtable import TreeRoutingTable from lbrynet.dht.routingtable import TreeRoutingTable
from lbrynet.dht.contact import ContactManager from lbrynet.dht.contact import ContactManager
from lbrynet.dht.distance import Distance from lbrynet.dht.distance import Distance
from lbrynet.core.utils import generate_id from lbrynet.p2p.utils import generate_id
class FakeRPCProtocol: class FakeRPCProtocol:

View file

@ -3,16 +3,16 @@ from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.algorithms import AES
from lbrynet.core.StreamDescriptor import get_sd_info, BlobStreamDescriptorReader from lbrynet.p2p.StreamDescriptor import get_sd_info, BlobStreamDescriptorReader
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.p2p.StreamDescriptor import StreamDescriptorIdentifier
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.PeerManager import PeerManager from lbrynet.p2p.PeerManager import PeerManager
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.p2p.RateLimiter import DummyRateLimiter
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage
from lbrynet.file_manager import EncryptedFileCreator from lbrynet.file_manager import EncryptedFileCreator
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
from lbrynet.core.StreamDescriptor import JSONBytesEncoder from lbrynet.p2p.StreamDescriptor import JSONBytesEncoder
from tests import mocks from tests import mocks
from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir from tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir

View file

@ -22,7 +22,7 @@ from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDow
from lbrynet.extras.wallet import LbryWalletManager from lbrynet.extras.wallet import LbryWalletManager
from torba.client.wallet import Wallet from torba.client.wallet import Wallet
from lbrynet.core.PaymentRateManager import OnlyFreePaymentsManager from lbrynet.p2p.PaymentRateManager import OnlyFreePaymentsManager
from tests import util from tests import util
from tests.mocks import mock_conf_settings, FakeNetwork, FakeFileManager from tests.mocks import mock_conf_settings, FakeNetwork, FakeFileManager
from tests.mocks import ExchangeRateManager as DummyExchangeRateManager from tests.mocks import ExchangeRateManager as DummyExchangeRateManager

View file

@ -4,11 +4,11 @@ from twisted.trial import unittest
from twisted.internet import defer, task from twisted.internet import defer, task
from lbrynet.core import PaymentRateManager from lbrynet.p2p import PaymentRateManager
from lbrynet.core.Error import DownloadDataTimeout, DownloadSDTimeout from lbrynet.p2p.Error import DownloadDataTimeout, DownloadSDTimeout
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier from lbrynet.p2p.StreamDescriptor import StreamDescriptorIdentifier
from lbrynet.core.BlobManager import DiskBlobManager from lbrynet.p2p.BlobManager import DiskBlobManager
from lbrynet.core.RateLimiter import DummyRateLimiter from lbrynet.p2p.RateLimiter import DummyRateLimiter
from lbrynet.extras.daemon import Downloader from lbrynet.extras.daemon import Downloader
from lbrynet.extras.daemon import ExchangeRateManager from lbrynet.extras.daemon import ExchangeRateManager
from lbrynet.extras.daemon.storage import SQLiteStorage from lbrynet.extras.daemon.storage import SQLiteStorage

View file

@ -1,6 +1,6 @@
from lbrynet.schema.fee import Fee from lbrynet.schema.fee import Fee
from lbrynet.extras.daemon import ExchangeRateManager from lbrynet.extras.daemon import ExchangeRateManager
from lbrynet.core.Error import InvalidExchangeRateResponse from lbrynet.p2p.Error import InvalidExchangeRateResponse
from twisted.trial import unittest from twisted.trial import unittest
from twisted.internet import defer from twisted.internet import defer
from tests import util from tests import util

View file

@ -3,7 +3,7 @@ from io import StringIO
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet.cli import normalize_value, main from lbrynet.cli import normalize_value, main
from lbrynet.core.system_info import get_platform from lbrynet.p2p.system_info import get_platform
class CLITest(unittest.TestCase): class CLITest(unittest.TestCase):

View file

@ -5,7 +5,7 @@ import tempfile
from unittest import skipIf from unittest import skipIf
from twisted.trial import unittest from twisted.trial import unittest
from lbrynet import conf from lbrynet import conf
from lbrynet.core.Error import InvalidCurrencyError from lbrynet.p2p.Error import InvalidCurrencyError
class SettingsTest(unittest.TestCase): class SettingsTest(unittest.TestCase):

View file

@ -32,11 +32,11 @@ def resetTime(test_case, timestamp=DEFAULT_TIMESTAMP):
patcher.start().return_value = iso_time patcher.start().return_value = iso_time
test_case.addCleanup(patcher.stop) test_case.addCleanup(patcher.stop)
patcher = mock.patch('lbrynet.core.utils.now') patcher = mock.patch('lbrynet.p2p.utils.now')
patcher.start().return_value = timestamp patcher.start().return_value = timestamp
test_case.addCleanup(patcher.stop) test_case.addCleanup(patcher.stop)
patcher = mock.patch('lbrynet.core.utils.utcnow') patcher = mock.patch('lbrynet.p2p.utils.utcnow')
patcher.start().return_value = timestamp patcher.start().return_value = timestamp
test_case.addCleanup(patcher.stop) test_case.addCleanup(patcher.stop)