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:
yihuang
2022-04-19 12:49:05 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent eaca3e09e2
commit 0543a28941
3 changed files with 70 additions and 50 deletions
+1 -1
View File
@@ -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] {