def __init__(self, headerdb: BaseAsyncHeaderDB, peer_pool: LESPeerPool) -> None: PeerSubscriber.__init__(self) self.logger = get_logger('trinity.sync.light.LightPeerChain') self.headerdb = headerdb self.peer_pool = peer_pool self._pending_replies = weakref.WeakValueDictionary()
def __init__(self, headerdb: BaseAsyncHeaderDB, peer_pool: LESPeerPool, token: CancelToken = None) -> None: PeerSubscriber.__init__(self) BaseService.__init__(self, token) self.headerdb = headerdb self.peer_pool = peer_pool self._pending_replies = weakref.WeakValueDictionary()
def __init__(self, headerdb: BaseAsyncHeaderDB, peer_pool: LESPeerPool, token: CancelToken = None) -> None: PeerSubscriber.__init__(self) BaseService.__init__(self, token) self.headerdb = headerdb self.peer_pool = peer_pool self._pending_replies: Dict[int, Callable[[Payload], None]] = {}