Module Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr orelse If BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Expr Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore NameLoad body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list Assign NameStore ListLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call NameLoad NameLoad Return NameLoad decorator_list decorator_list
N/A N/A logging N/A miniupnpc lbrynet.core.PTCWallet PTCWallet lbrynet.core.BlobManager DiskBlobManager TempBlobManager lbrynet.dht node lbrynet.core.PeerManager PeerManager lbrynet.core.RateLimiter RateLimiter lbrynet.core.client.DHTPeerFinder DHTPeerFinder lbrynet.core.HashAnnouncer DummyHashAnnouncer lbrynet.core.server.DHTHashAnnouncer DHTHashAnnouncer lbrynet.core.utils generate_id lbrynet.core.PaymentRateManager BasePaymentRateManager twisted.internet threads defer N/A log N/A N/A logging getLogger __name__ LBRYSession N/A object N/A N/A This class manages all important services common to any application that uses the network:
    the hash announcer, which informs other peers that this peer is associated with some hash. Usually,
    this means this peer has a blob identified by the hash in question, but it can be used for other
    purposes.
    the peer finder, which finds peers that are associated with some hash.
    the blob manager, which keeps track of which blobs have been downloaded and provides access to them,
    the rate limiter, which attempts to ensure download and upload rates stay below a set maximum,
    and upnp, which opens holes in compatible firewalls so that remote peers can connect to this peer. __init__ N/A N/A self blob_data_payment_rate db_dir lbryid peer_manager dht_node_port known_dht_nodes peer_finder hash_announcer blob_dir blob_manager peer_port use_upnp rate_limiter wallet N/A None None None None None None None None None None True None None N/A N/A 
        @param blob_data_payment_rate: The default payment rate for blob data

        @param db_dir: The directory in which levelDB files should be stored

        @param lbryid: The unique ID of this node

        @param peer_manager: An object which keeps track of all known peers. If None, a PeerManager will be created

        @param dht_node_port: The port on which the dht node should listen for incoming connections

        @param known_dht_nodes: A list of nodes which the dht node should use to bootstrap into the dht

        @param peer_finder: An object which is used to look up peers that are associated with some hash. If None,
            a DHTPeerFinder will be used, which looks for peers in the distributed hash table.

        @param hash_announcer: An object which announces to other peers that this peer is associated with some hash.
            If None, and peer_port is not None, a DHTHashAnnouncer will be used. If None and
            peer_port is None, a DummyHashAnnouncer will be used, which will not actually announce
            anything.

        @param blob_dir: The directory in which blobs will be stored. If None and blob_manager is None, blobs will
            be stored in memory only.

        @param blob_manager: An object which keeps track of downloaded blobs and provides access to them. If None,
            and blob_dir is not None, a DiskBlobManager will be used, with the given blob_dir.
            If None and blob_dir is None, a TempBlobManager will be used, which stores blobs in
            memory only.

        @param peer_port: The port on which other peers should connect to this peer

        @param use_upnp: Whether or not to try to open a hole in the firewall so that outside peers can connect to
            this peer's peer_port and dht_node_port

        @param rate_limiter: An object which keeps track of the amount of data transferred to and from this peer,
            and can limit that rate if desired

        @param wallet: An object which will be used to keep track of expected payments and which will pay peers.
            If None, a wallet which uses the Point Trader system will be used, which is meant for testing
            only

        @return:
         N/A N/A self db_dir db_dir N/A N/A self lbryid lbryid N/A N/A self peer_manager peer_manager N/A N/A self dht_node_port dht_node_port N/A N/A self known_dht_nodes known_dht_nodes N/A N/A N/A self known_dht_nodes None N/A N/A N/A self known_dht_nodes N/A N/A N/A self peer_finder peer_finder N/A N/A self hash_announcer hash_announcer N/A N/A self blob_dir blob_dir N/A N/A self blob_manager blob_manager N/A N/A self peer_port peer_port N/A N/A self use_upnp use_upnp N/A N/A self rate_limiter rate_limiter N/A N/A self external_ip 127.0.0.1 N/A N/A self upnp_redirects N/A N/A N/A self wallet wallet N/A N/A self dht_node None N/A N/A self base_payment_rate_manager N/A BasePaymentRateManager blob_data_payment_rate N/A setup N/A N/A self N/A N/A N/A Create the blob directory and database if necessary, start all desired services N/A N/A N/A log debug Setting up the lbry session N/A N/A N/A self lbryid None N/A N/A N/A self lbryid N/A generate_id N/A N/A N/A self wallet None N/A N/A N/A self wallet N/A PTCWallet N/A self db_dir N/A N/A N/A self peer_manager None N/A N/A N/A self peer_manager N/A PeerManager N/A N/A N/A self use_upnp True N/A N/A d N/A N/A self _try_upnp N/A N/A d N/A N/A defer succeed True N/A N/A N/A self peer_finder None N/A N/A N/A N/A d addCallback N/A N/A N/A _ N/A N/A N/A self _setup_dht N/A N/A N/A N/A N/A self hash_announcer None N/A N/A self peer_port None N/A N/A N/A N/A log warning The server has no way to advertise its available blobs. N/A N/A self hash_announcer N/A DummyHashAnnouncer N/A N/A N/A d addCallback N/A N/A N/A _ N/A N/A N/A self _setup_other_components N/A d N/A shut_down N/A N/A self N/A N/A N/A Stop all services N/A ds N/A N/A N/A N/A self dht_node None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self dht_node stop N/A N/A N/A self rate_limiter None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self rate_limiter stop N/A N/A N/A self peer_finder None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self peer_finder stop N/A N/A N/A self hash_announcer None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self hash_announcer stop N/A N/A N/A self wallet None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self wallet stop N/A N/A N/A self blob_manager None N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A N/A self blob_manager stop N/A N/A N/A self use_upnp True N/A N/A N/A N/A ds append N/A N/A defer maybeDeferred N/A self _unset_upnp N/A N/A N/A defer DeferredList ds N/A _try_upnp N/A N/A self N/A N/A N/A N/A N/A log debug In _try_upnp threaded_try_upnp N/A N/A N/A N/A N/A N/A N/A self use_upnp False N/A N/A N/A N/A log debug Not using upnp N/A False N/A u N/A N/A miniupnpc UPnP N/A num_devices_found N/A N/A u discover N/A N/A num_devices_found 0 N/A N/A N/A N/A u selectigd N/A external_ip N/A N/A u externalipaddress N/A N/A external_ip 0.0.0.0 N/A N/A N/A self external_ip external_ip N/A N/A N/A self peer_port None N/A N/A N/A N/A N/A u getspecificportmapping N/A self peer_port TCP None N/A N/A N/A N/A u addportmapping N/A self peer_port TCP N/A u lanaddr N/A self peer_port LBRY peer port N/A N/A N/A N/A self upnp_redirects append N/A N/A self peer_port TCP N/A N/A N/A log info Set UPnP redirect for TCP port %d N/A self peer_port N/A N/A N/A N/A log warning UPnP redirect already set for TCP port %d N/A self peer_port N/A N/A N/A self dht_node_port None N/A N/A N/A N/A N/A u getspecificportmapping N/A self dht_node_port UDP None N/A N/A N/A N/A u addportmapping N/A self dht_node_port UDP N/A u lanaddr N/A self dht_node_port LBRY DHT port N/A N/A N/A N/A self upnp_redirects append N/A N/A self dht_node_port UDP N/A N/A N/A log info Set UPnP redirect for UPD port %d N/A self dht_node_port N/A N/A N/A N/A log warning UPnP redirect already set for UDP port %d N/A self dht_node_port N/A True N/A False N/A upnp_failed N/A N/A err N/A N/A N/A N/A N/A log warning UPnP failed. Reason: %s N/A N/A err getErrorMessage N/A False N/A N/A d N/A N/A threads deferToThread threaded_try_upnp N/A N/A N/A d addErrback upnp_failed N/A d N/A _setup_dht N/A N/A self N/A N/A twisted.internet reactor N/A N/A N/A log debug Starting the dht match_port N/A N/A h p N/A N/A N/A N/A h p N/A join_resolved_addresses N/A N/A result N/A N/A N/A addresses N/A N/A N/A success value result N/A N/A N/A success True N/A N/A N/A N/A addresses append value N/A addresses N/A start_dht N/A N/A addresses N/A N/A N/A N/A N/A N/A self dht_node joinNetwork addresses N/A N/A N/A N/A self peer_finder run_manage_loop N/A N/A N/A N/A self hash_announcer run_manage_loop N/A True N/A N/A ds N/A N/A N/A host port N/A self known_dht_nodes N/A N/A d N/A N/A reactor resolve host N/A N/A N/A d addCallback match_port port N/A N/A N/A ds append d N/A N/A self dht_node N/A N/A node Node udpPort N/A self dht_node_port lbryid N/A self lbryid externalIP N/A self external_ip N/A N/A self peer_finder N/A DHTPeerFinder N/A self dht_node N/A self peer_manager N/A N/A N/A self hash_announcer None N/A N/A N/A self hash_announcer N/A DHTHashAnnouncer N/A self dht_node N/A self peer_port N/A dl N/A N/A defer DeferredList ds N/A N/A N/A dl addCallback join_resolved_addresses N/A N/A N/A dl addCallback start_dht N/A dl N/A _setup_other_components N/A N/A self N/A N/A N/A N/A N/A log debug Setting up the rest of the components N/A N/A N/A self rate_limiter None N/A N/A N/A self rate_limiter N/A RateLimiter N/A N/A N/A self blob_manager None N/A N/A N/A N/A self blob_dir None N/A N/A N/A self blob_manager N/A TempBlobManager N/A self hash_announcer N/A N/A N/A self blob_manager N/A DiskBlobManager N/A self hash_announcer N/A self blob_dir N/A self db_dir N/A N/A N/A N/A self rate_limiter start N/A d1 N/A N/A N/A self blob_manager setup N/A d2 N/A N/A N/A self wallet start N/A dl N/A N/A defer DeferredList N/A d1 d2 fireOnOneErrback True consumeErrors True N/A N/A N/A dl addErrback N/A N/A N/A err N/A N/A N/A err value subFailure N/A dl N/A _unset_upnp N/A N/A self N/A N/A threaded_unset_upnp N/A N/A N/A N/A N/A u N/A N/A miniupnpc UPnP N/A num_devices_found N/A N/A u discover N/A N/A num_devices_found 0 N/A N/A N/A N/A u selectigd N/A N/A port protocol N/A self upnp_redirects N/A N/A N/A N/A N/A u getspecificportmapping port protocol None N/A N/A N/A N/A log warning UPnP redirect for %s %d was removed by something else. protocol port N/A N/A N/A N/A u deleteportmapping port protocol N/A N/A N/A log info Removed UPnP redirect for %s %d. protocol port N/A N/A self upnp_redirects N/A N/A N/A d N/A N/A threads deferToThread threaded_unset_upnp N/A N/A N/A d addErrback N/A N/A N/A err N/A N/A str err N/A d N/A N/A