Closed oracle58 closed 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)
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:
--validator
is boolean that indicates whether a node is validator. If seed and/or keyfile are in resources dir, the files are automatically detected / created.--validator-path
: we detect in the code if the path ends with .key or .txt and imply whether its a seed or a keyfile. (not sure this would be real efficient).otherwise:
--validator-seed-path
and --validator-key-path
seems fine too, if setting --validator
is sufficient, given that at least seed.txt is located in the resources dir.
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#L138Expected Behavior
Even if
Validator.key
exists the--validator
startup flag should still be required, but without having to pass the path to the seed.--validator <PathToSeed>
(validator.key is created)--validator
setting, the node should follow the standard routine--validator
setting, no<PathToSeed>
should be required anymore--validator
setting should ideally also accept<PathToValidatorKey>
.