rpc: dont log an error if user configures --rpcapi=rpc...

Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
meows 2020-03-17 15:59:26 -05:00
parent 8d7aa9078f
commit 6cf13c5e76
No known key found for this signature in database
GPG key ID: 5786AEA5C8D5A520

View file

@ -23,7 +23,7 @@ import (
) )
// checkModuleAvailability check that all names given in modules are actually // checkModuleAvailability check that all names given in modules are actually
// available API services. // available API services. It assumes that the special snowflake "rpc" module is always available.
func checkModuleAvailability(modules []string, apis []API) (bad, available []string) { func checkModuleAvailability(modules []string, apis []API) (bad, available []string) {
availableSet := make(map[string]struct{}) availableSet := make(map[string]struct{})
for _, api := range apis { for _, api := range apis {
@ -33,7 +33,7 @@ func checkModuleAvailability(modules []string, apis []API) (bad, available []str
} }
} }
for _, name := range modules { for _, name := range modules {
if _, ok := availableSet[name]; !ok { if _, ok := availableSet[name]; !ok && name != MetadataApi {
bad = append(bad, name) bad = append(bad, name)
} }
} }