forked from cerc-io/laconicd-deprecated
rpc: make json-rpc API namespaces extensible (#1056)
* make jsonrpc api namespaces extensible Closes: #1052, #1037 * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
parent
eaca3e09e2
commit
0543a28941
@@ -237,7 +237,7 @@ func (c JSONRPCConfig) Validate() error {
|
||||
return errors.New("JSON-RPC HTTP idle timeout duration cannot be negative")
|
||||
}
|
||||
|
||||
// TODO: validate APIs
|
||||
// check for duplicates
|
||||
seenAPIs := make(map[string]bool)
|
||||
for _, api := range c.API {
|
||||
if seenAPIs[api] {
|
||||
|
||||
Reference in New Issue
Block a user