mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Copy default data to avoid undesirable mutations
This commit is contained in:
@ -5,3 +5,7 @@ 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()
|
||||
|
||||
Reference in New Issue
Block a user