2019-05-31 18:36:32 +00:00
|
|
|
type
|
|
|
|
NetworkBackendType* = enum
|
|
|
|
libp2pSpecBackend
|
|
|
|
libp2pNativeBackend
|
|
|
|
rlpxBackend
|
|
|
|
|
2019-03-18 03:54:08 +00:00
|
|
|
const
|
2019-05-31 18:36:32 +00:00
|
|
|
network_type {.strdefine.} = "libp2p_spec"
|
|
|
|
|
|
|
|
networkBackend* = when network_type == "rlpx": rlpxBackend
|
|
|
|
elif network_type == "libp2p_spec": libp2pSpecBackend
|
|
|
|
elif network_type == "libp2p_native": libp2pNativeBackend
|
|
|
|
else: {.fatal: "The 'network_type' should be one of 'libp2p_spec', 'libp2p_native' or 'rlpx'" .}
|
2019-03-18 03:54:08 +00:00
|
|
|
|
2019-03-05 22:54:08 +00:00
|
|
|
const
|
|
|
|
versionMajor* = 0
|
2019-05-14 13:31:19 +00:00
|
|
|
versionMinor* = 2
|
|
|
|
versionBuild* = 0
|
2019-03-05 22:54:08 +00:00
|
|
|
|
2019-05-14 13:31:19 +00:00
|
|
|
semanticVersion* = 1
|
2019-04-08 12:46:12 +00: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-05 22:54:08 +00:00
|
|
|
template versionAsStr*: string =
|
|
|
|
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
|
|
|
|
2019-03-18 03:54:08 +00:00
|
|
|
proc fullVersionStr*: string =
|
2019-05-31 18:36:32 +00:00
|
|
|
versionAsStr & "_" & network_type
|
|
|
|
|