HelixNetwork / pendulum

Pendulum is a distributed messaging protocol that enables globally available tamper proof timestamps :hourglass_flowing_sand:
https://dev.hlx.ai
Other
10 stars 6 forks source link

If Validator.key exists Node will always start as a Validator regardless of startup flag/settings #196

Closed oracle58 closed 4 years ago

oracle58 commented 4 years ago

Current Behavior

As soon as a valid Validator.key exists (in the resources dir) the node always starts as a validator, even if --validator is not explicitly set. https://github.com/HelixNetwork/pendulum/blob/dev/src/main/java/net/helix/pendulum/Main.java#L138

Expected Behavior

Even if Validator.key exists the --validator startup flag should still be required, but without having to pass the path to the seed.

cristina-vasiu commented 4 years ago

Flag --validator can not be used without value (only boolean parameters are allowed to not have any value), if we want to use a parameter without any value we have to change its name. We should than have --validator (to show that a node is validator) And --validatorSeedPath (to give path to validator seed file) And maybe --validatorKeyPath (to change default key location)

oracle58 commented 4 years ago

Flag --validator can not be used without value (only boolean parameters are allowed to not have any value), if we want to use a parameter without any value we have to change its name. We should than have --validator (to show that a node is validator) And --validatorSeedPath (to give path to validator seed file) And maybe --validatorKeyPath (to change default key location)

Another suggestion:

otherwise: