2019-05-31 21:36:32 +03:00
|
|
|
type
|
|
|
|
NetworkBackendType* = enum
|
2019-08-05 03:00:49 +03:00
|
|
|
libp2pBackend
|
2019-05-31 21:36:32 +03:00
|
|
|
rlpxBackend
|
|
|
|
|
2019-03-18 05:54:08 +02:00
|
|
|
const
|
2019-08-05 03:00:49 +03:00
|
|
|
network_type {.strdefine.} = "libp2p"
|
2019-05-31 21:36:32 +03:00
|
|
|
|
|
|
|
networkBackend* = when network_type == "rlpx": rlpxBackend
|
2019-08-05 03:00:49 +03:00
|
|
|
elif network_type == "libp2p": libp2pBackend
|
|
|
|
else: {.fatal: "The 'network_type' should be either 'libp2p' or 'rlpx'" .}
|
2019-03-18 05:54:08 +02:00
|
|
|
|
2019-03-06 00:54:08 +02:00
|
|
|
const
|
|
|
|
versionMajor* = 0
|
2019-08-05 03:00:49 +03:00
|
|
|
versionMinor* = 3
|
2019-05-14 16:31:19 +03:00
|
|
|
versionBuild* = 0
|
2019-03-06 00:54:08 +02:00
|
|
|
|
2019-08-05 03:00:49 +03:00
|
|
|
semanticVersion* = 2
|
2019-04-08 15:46:12 +03:00
|
|
|
# Bump this up every time a breaking change is introduced
|
|
|
|
# Clients having different semantic versions won't be able
|
|
|
|
# to join the same testnets.
|
|
|
|
|
2019-03-06 00:54:08 +02:00
|
|
|
template versionAsStr*: string =
|
|
|
|
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
|
|
|
|
2019-03-18 05:54:08 +02:00
|
|
|
proc fullVersionStr*: string =
|
2019-05-31 21:36:32 +03:00
|
|
|
versionAsStr & "_" & network_type
|
|
|
|
|