Closed joegraviton closed 1 year ago
@joegraviton Let me know what you think of this solution https://github.com/livepeer/go-livepeer/pull/2713
ethKeystorePath
will now accept either a directory or file without issue.
When a file is provided, ethAcctAddr
will be set automatically so the extra flag is no longer needed. The parent directory is used as the "keystore path" for additional accounts.
When a folder is provided, the exact directory is used for keystore path and ethAcctAddr
can be used to select an account for backwards compatibility.
@eliteprox That's perfect, thank you !
Describe the bug
The name and cli help for this option is unclear and misleading.
To Reproduce Steps to reproduce the behavior:
From the name
ethKeystorePath
, it looks like I should provide a dir path like:But, from the help msg, it looks like I should provide a file path, like:
This is too lengthy, I believe most users would rather not to provide it.
If I provide
/root/.lpData/keystore
, the actually dir code will look into will be/root/.lpData/
, which is unexpcted. To get this right, I must provide the path with trailing/
:/root/.lpData/keystore/
.If I provide the lengthy key file path, code will look into the parent dir, the actual key file name is ignored. If you have multiple keys in that dir, you will need to specify it again, with
-ethAcctAddr
. Also unexpected.related source code:
https://github.com/livepeer/go-livepeer/blob/7be4c3b518544f6cf29f79872e545b1a34cf72d9/cmd/livepeer/starter/starter.go#L525-L530
If the path exists, either it's dir or file, the path is split, which is not reasonable.
Expected behavior
This option should be a path to a
keystore
dir, no matter it has trailing/
or not.