コード例 #1
0
ファイル: service.py プロジェクト: nondejus/trinity
 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()
コード例 #2
0
 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()
コード例 #3
0
 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]] = {}