Added prerequisite for using the test clock.

This commit is contained in:
Clinton Alexander 2016-10-21 17:29:59 +01:00
parent 71e1c39622
commit 19a53ea12d

View File

@ -52,6 +52,9 @@ class FullNodeConfiguration(config: Config) : NodeConfiguration {
val useTestClock: Boolean by config.getOrElse { false }
fun createNode(): Node {
// This is a sanity feature do not remove.
require(!useTestClock || devMode) { "Cannot use test clock outside of dev mode" }
val advertisedServices = mutableSetOf<ServiceInfo>()
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
for (serviceId in extraAdvertisedServiceIds.split(",")) {