mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-25 11:39:09 +00:00
27 lines
559 B
Nim
27 lines
559 B
Nim
import
|
|
eth/p2p/discoveryv5/routing_table
|
|
|
|
type
|
|
PortalProtocolConfig* = object
|
|
tableIpLimits*: TableIpLimits
|
|
bitsPerHop*: int
|
|
|
|
const
|
|
defaultPortalProtocolConfig* = PortalProtocolConfig(
|
|
tableIpLimits: DefaultTableIpLimits,
|
|
bitsPerHop: DefaultBitsPerHop)
|
|
|
|
proc init*(
|
|
T: type PortalProtocolConfig,
|
|
tableIpLimit: uint,
|
|
bucketIpLimit: uint,
|
|
bitsPerHop: int): T =
|
|
|
|
PortalProtocolConfig(
|
|
tableIpLimits: TableIpLimits(
|
|
tableIpLimit: tableIpLimit,
|
|
bucketIpLimit: bucketIpLimit),
|
|
bitsPerHop: bitsPerHop
|
|
)
|
|
|