mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 22:50:54 +00:00
style: fix flake8 linting errors
This commit is contained in:
@ -7,4 +7,4 @@ ALPHA = 3 # Concurrency parameter
|
|||||||
PROTOCOL_ID = TProtocol("/ipfs/kad/1.0.0")
|
PROTOCOL_ID = TProtocol("/ipfs/kad/1.0.0")
|
||||||
QUERY_TIMEOUT = 10
|
QUERY_TIMEOUT = 10
|
||||||
|
|
||||||
TTL = DEFAULT_TTL = 24 * 60 * 60 # 24 hours in seconds
|
TTL = DEFAULT_TTL = 24 * 60 * 60 # 24 hours in seconds
|
||||||
|
|||||||
@ -18,9 +18,6 @@ import varint
|
|||||||
from libp2p.abc import (
|
from libp2p.abc import (
|
||||||
IHost,
|
IHost,
|
||||||
)
|
)
|
||||||
from libp2p.custom_types import (
|
|
||||||
TProtocol,
|
|
||||||
)
|
|
||||||
from libp2p.network.stream.net_stream import (
|
from libp2p.network.stream.net_stream import (
|
||||||
INetStream,
|
INetStream,
|
||||||
)
|
)
|
||||||
@ -60,6 +57,7 @@ logger = logging.getLogger("kademlia-example.kad_dht")
|
|||||||
# Default parameters
|
# Default parameters
|
||||||
ROUTING_TABLE_REFRESH_INTERVAL = 60 # 1 min in seconds for testing
|
ROUTING_TABLE_REFRESH_INTERVAL = 60 # 1 min in seconds for testing
|
||||||
|
|
||||||
|
|
||||||
class DHTMode(Enum):
|
class DHTMode(Enum):
|
||||||
"""DHT operation modes."""
|
"""DHT operation modes."""
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ from .common import (
|
|||||||
# logger = logging.getLogger("libp2p.kademlia.value_store")
|
# logger = logging.getLogger("libp2p.kademlia.value_store")
|
||||||
logger = logging.getLogger("kademlia-example.value_store")
|
logger = logging.getLogger("kademlia-example.value_store")
|
||||||
|
|
||||||
|
|
||||||
class ValueStore:
|
class ValueStore:
|
||||||
"""
|
"""
|
||||||
Store for key-value pairs in a Kademlia DHT.
|
Store for key-value pairs in a Kademlia DHT.
|
||||||
|
|||||||
Reference in New Issue
Block a user