mirror of
https://github.com/corda/corda.git
synced 2025-01-14 00:39:57 +00:00
ENT-1683 Ensuring that the updateDeadline time is in the future (#609)
* Ensuring that the updateDeadline time is in the future * Addressing review comments
This commit is contained in:
parent
3ce5dac90f
commit
68cdd5e374
@ -35,7 +35,12 @@ data class NotaryConfig(private val notaryNodeInfoFile: Path,
|
||||
}
|
||||
}
|
||||
|
||||
data class ParametersUpdateConfig(val description: String, val updateDeadline: Instant)
|
||||
data class ParametersUpdateConfig(val description: String, val updateDeadline: Instant) {
|
||||
init {
|
||||
val now = Instant.now()
|
||||
require(updateDeadline == now || updateDeadline.isAfter(now)) { "The updateDeadline time must be in the future." }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data class containing the fields from [NetworkParameters] which can be read at start-up time from doorman.
|
||||
|
Loading…
Reference in New Issue
Block a user