Client: now the client binary accept an --endpoint argument to specify the RPC URL base
Fixes: #861 (closed)
Currently to tell the client binary which RPC endpoint it should talk with one could only use the combination of --addr
--port
--tls
. This has its limitation and doesn't support RPC servers that make uses of contextual path.
This MR introduces a new client argument --endpoint
which allows the user to directly specify an RPC endpoint.
Also, this MR will disallow specifying both --endpoint and any of the other three options; and raise warning if any of --addr --port or --tls exists on either the cli args or in the config file
more specifically, the endpoint will be decided as below
endpoint logic:
1) if --endpoint provided as CLI argument,
use it but check no presence of --addr, --port, or --tls
2) otherwise, merge --addr, --port, and --tls with config file; then
2a) if --endpoint exists in config file,
use it but check no presence of merged --addr, --port, or --tls
2b) otherwise synthesize --endpoint from --addr, --port, and --tls
Edited by Arvid Jakobsson