mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
chore(kad_dht): centralize shared values in common.py
This commit is contained in:
10
libp2p/kad_dht/common.py
Normal file
10
libp2p/kad_dht/common.py
Normal file
@ -0,0 +1,10 @@
|
||||
from libp2p.custom_types import (
|
||||
TProtocol,
|
||||
)
|
||||
|
||||
# Constants for the Kademlia algorithm
|
||||
ALPHA = 3 # Concurrency parameter
|
||||
PROTOCOL_ID = TProtocol("/ipfs/kad/1.0.0")
|
||||
QUERY_TIMEOUT = 10
|
||||
|
||||
TTL = DEFAULT_TTL = 24 * 60 * 60 # 24 hours in seconds
|
||||
Reference in New Issue
Block a user