mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-02 20:11:28 +00:00
chore(kad_dht): centralize shared values in common.py
This commit is contained in:
@ -23,14 +23,14 @@ from .pb.kademlia_pb2 import (
|
||||
Message,
|
||||
)
|
||||
|
||||
from .common import (
|
||||
PROTOCOL_ID,
|
||||
DEFAULT_TTL
|
||||
)
|
||||
|
||||
# logger = logging.getLogger("libp2p.kademlia.value_store")
|
||||
logger = logging.getLogger("kademlia-example.value_store")
|
||||
|
||||
# Default time to live for values in seconds (24 hours)
|
||||
DEFAULT_TTL = 24 * 60 * 60
|
||||
PROTOCOL_ID = TProtocol("/ipfs/kad/1.0.0")
|
||||
|
||||
|
||||
class ValueStore:
|
||||
"""
|
||||
Store for key-value pairs in a Kademlia DHT.
|
||||
|
||||
Reference in New Issue
Block a user