mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Default protocols are constructed using a reference to the host
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
from collections import OrderedDict
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from libp2p.host.host_interface import IHost
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from libp2p.typing import TProtocol, StreamHandlerFn
|
||||
|
||||
DEFAULT_HOST_PROTOCOLS: "OrderedDict[TProtocol, StreamHandlerFn]" = OrderedDict()
|
||||
|
||||
|
||||
def get_default_protocols() -> "OrderedDict[TProtocol, StreamHandlerFn]":
|
||||
return DEFAULT_HOST_PROTOCOLS.copy()
|
||||
def get_default_protocols(host: IHost) -> "OrderedDict[TProtocol, StreamHandlerFn]":
|
||||
return OrderedDict()
|
||||
|
||||
Reference in New Issue
Block a user