Module Expr Str Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body 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 Call NameLoad Call AttributeLoad NameLoad attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpBitXor AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Return Assign NameStore ListLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareNotIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return CompareEq Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Return ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareGt Call NameLoad NameLoad Num body Return SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad Call NameLoad Call NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListComp NameLoad comprehension NameStore NameLoad CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Copyright (c) 2014 Brian Muller
Copyright (c) 2015 OpenBazaar
 N/A heapq operator itemgetter protos objects Node N/A object N/A __init__ N/A N/A self node_id ip port pubkey relay_node nat_type vendor N/A None None None None None False N/A N/A N/A self id node_id N/A N/A self ip ip N/A N/A self port port N/A N/A self pubkey pubkey N/A N/A self relay_node relay_node N/A N/A self nat_type nat_type N/A N/A self vendor vendor N/A N/A self long_id N/A long N/A N/A node_id encode hex 16 N/A getProto N/A N/A self N/A N/A N/A node_address N/A N/A N/A objects Node IPAddress N/A N/A node_address ip N/A self ip N/A N/A node_address port N/A self port N/A n N/A N/A objects Node N/A N/A n guid N/A self id N/A N/A n publicKey N/A self pubkey N/A N/A n natType N/A self nat_type N/A N/A N/A N/A n nodeAddress MergeFrom node_address N/A N/A n vendor N/A self vendor N/A N/A N/A self relay_node None N/A N/A relay_address N/A N/A N/A objects Node IPAddress N/A N/A relay_address ip N/A N/A self relay_node N/A 0 N/A N/A relay_address port N/A N/A self relay_node N/A 1 N/A N/A N/A N/A n relayAddress MergeFrom relay_address N/A n N/A sameHomeAs N/A N/A self node N/A N/A N/A N/A N/A N/A self ip N/A node ip N/A N/A self port N/A node port N/A distanceTo N/A N/A self node N/A N/A N/A 
        Get the distance between this node and another.
         N/A N/A N/A self long_id N/A node long_id N/A __iter__ N/A N/A self N/A N/A N/A 
        Enables use of Node as a tuple - i.e., tuple(node) works.
         N/A N/A iter N/A N/A self id N/A self ip N/A self port N/A __repr__ N/A N/A self N/A N/A N/A N/A repr N/A N/A self long_id N/A self ip N/A self port N/A __str__ N/A N/A self N/A N/A N/A N/A %s:%s N/A N/A self ip N/A str N/A self port N/A N/A NodeHeap N/A object N/A N/A 
    A heap of nodes ordered by distance to a given node.
     __init__ N/A N/A self node maxsize N/A N/A N/A 
        Constructor.

        @param node: The node to measure all distances from.
        @param maxsize: The maximum size that this heap can grow to.
         N/A N/A self node node N/A N/A self heap N/A N/A N/A self contacted N/A set N/A N/A self maxsize maxsize N/A remove N/A N/A self peerIDs N/A N/A N/A 
        Remove a list of peer ids from this heap.  Note that while this
        heap retains a constant visible size (based on the iterator), it's
        actual size may be quite a bit larger than what's exposed.  Therefore,
        removal of nodes may not change the visible size as previously added
        nodes suddenly become visible.
         N/A peerIDs N/A set peerIDs N/A N/A N/A len peerIDs 0 N/A N/A N/A nheap N/A N/A N/A distance node N/A self heap N/A N/A N/A N/A node id peerIDs N/A N/A N/A N/A heapq heappush nheap N/A distance node N/A N/A self heap nheap N/A getNodeById N/A N/A self node_id N/A N/A N/A N/A _ node N/A self heap N/A N/A N/A N/A node id node_id N/A N/A node N/A None N/A allBeenContacted N/A N/A self N/A N/A N/A N/A N/A len N/A N/A self getUncontacted 0 N/A getIDs N/A N/A self N/A N/A N/A N/A N/A n id N/A n self N/A markContacted N/A N/A self node N/A N/A N/A N/A N/A N/A self contacted add N/A node id N/A popleft N/A N/A self N/A N/A N/A N/A N/A len self 0 N/A N/A N/A N/A N/A heapq heappop N/A self heap N/A 1 N/A None N/A push N/A N/A self nodes N/A N/A N/A 
        Push nodes onto heap.

        @param nodes: This can be a single item or a C{list}.
         N/A N/A N/A isinstance nodes list N/A N/A nodes N/A nodes N/A node nodes N/A N/A N/A node self N/A N/A distance N/A N/A N/A self node distanceTo node N/A N/A N/A heapq heappush N/A self heap N/A distance node N/A __len__ N/A N/A self N/A N/A N/A N/A min N/A len N/A self heap N/A self maxsize N/A __iter__ N/A N/A self N/A N/A N/A nodes N/A N/A heapq nsmallest N/A self maxsize N/A self heap N/A N/A iter N/A map N/A itemgetter 1 nodes N/A __contains__ N/A N/A self node N/A N/A N/A N/A distance n N/A self heap N/A N/A N/A N/A node id N/A n id N/A N/A True N/A False N/A getUncontacted N/A N/A self N/A N/A N/A N/A n N/A n self N/A N/A n id N/A self contacted N/A N/A