Skip to content

Commit

Permalink
[rpc] align public rpc method to the private rpcs (#3948)
Browse files Browse the repository at this point in the history
Co-authored-by: Nita Neou <[email protected]>
  • Loading branch information
sophoah and sophoah authored Nov 25, 2021
1 parent 80b8333 commit 6561495
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (n Version) Namespace() string {
// StartServers starts the http & ws servers
func StartServers(hmy *hmy.Harmony, apis []rpc.API, config nodeconfig.RPCServerConfig) error {
apis = append(apis, getAPIs(hmy, config.DebugEnabled, config.RateLimiterEnabled, config.RequestsPerSecond)...)
authApis := getAuthAPIs(hmy, config.DebugEnabled, config.RateLimiterEnabled, config.RequestsPerSecond)
authApis := append(apis, getAuthAPIs(hmy, config.DebugEnabled, config.RateLimiterEnabled, config.RequestsPerSecond)...)

if config.HTTPEnabled {
httpEndpoint = fmt.Sprintf("%v:%v", config.HTTPIp, config.HTTPPort)
Expand Down Expand Up @@ -134,10 +134,10 @@ func StopServers() error {
}

func getAuthAPIs(hmy *hmy.Harmony, debugEnable bool, rateLimiterEnable bool, ratelimit int) []rpc.API {
return append(getAPIs(hmy, debugEnable, rateLimiterEnable, ratelimit), []rpc.API{
return []rpc.API{
NewPublicTraceAPI(hmy, Debug), // Debug version means geth trace rpc
NewPublicTraceAPI(hmy, Trace), // Trace version means parity trace rpc
}...)
}
}

// getAPIs returns all the API methods for the RPC interface
Expand Down

0 comments on commit 6561495

Please sign in to comment.