mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 13:56:23 +00:00
more detailed error message when you connect to an incompatible testnet
This commit is contained in:
parent
8273345a2c
commit
5b1caaff41
@ -104,7 +104,9 @@ proc init*(T: type BeaconNode, conf: BeaconNodeConf): Future[BeaconNode] {.async
|
||||
template checkCompatibility(metadataField, LOCAL_CONSTANT) =
|
||||
let metadataValue = metadataField
|
||||
if metadataValue != LOCAL_CONSTANT:
|
||||
metadataErrorMsg.add " -d:" & astToStr(LOCAL_CONSTANT) & "=" & $metadataValue
|
||||
if metadataErrorMsg.len > 0: metadataErrorMsg.add " and"
|
||||
metadataErrorMsg.add " -d:" & astToStr(LOCAL_CONSTANT) & "=" & $metadataValue &
|
||||
" (instead of " & $LOCAL_CONSTANT & ")"
|
||||
|
||||
checkCompatibility result.networkMetadata.numShards , SHARD_COUNT
|
||||
checkCompatibility result.networkMetadata.slotDuration , SECONDS_PER_SLOT
|
||||
|
Loading…
x
Reference in New Issue
Block a user