mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-27 04:26:07 +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
|
||
|
)
|
||
|
|