Skip to content

Commit d7851e6

Browse files
authored
graphql, node, rpc: fix typos in comments (ethereum#20824)
1 parent d3c1e65 commit d7851e6

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

graphql/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Service struct {
3535
cors []string // Allowed CORS domains
3636
vhosts []string // Recognised vhosts
3737
timeouts rpc.HTTPTimeouts // Timeout settings for HTTP requests.
38-
backend ethapi.Backend // The backend that queries will operate onn.
38+
backend ethapi.Backend // The backend that queries will operate on.
3939
handler http.Handler // The `http.Handler` used to answer queries.
4040
listener net.Listener // The listening socket.
4141
}

node/node.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (n *Node) Register(constructor ServiceConstructor) error {
158158
return nil
159159
}
160160

161-
// Start create a live P2P node and starts running it.
161+
// Start creates a live P2P node and starts running it.
162162
func (n *Node) Start() error {
163163
n.lock.Lock()
164164
defer n.lock.Unlock()
@@ -235,7 +235,7 @@ func (n *Node) Start() error {
235235
// Mark the service started for potential cleanup
236236
started = append(started, kind)
237237
}
238-
// Lastly start the configured RPC interfaces
238+
// Lastly, start the configured RPC interfaces
239239
if err := n.startRPC(services); err != nil {
240240
for _, service := range services {
241241
service.Stop()
@@ -274,7 +274,7 @@ func (n *Node) openDataDir() error {
274274
return nil
275275
}
276276

277-
// startRPC is a helper method to start all the various RPC endpoint during node
277+
// startRPC is a helper method to start all the various RPC endpoints during node
278278
// startup. It's not meant to be called at any time afterwards as it makes certain
279279
// assumptions about the state of the node.
280280
func (n *Node) startRPC(services map[reflect.Type]Service) error {

rpc/endpoints.go

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func StartWSEndpoint(endpoint string, apis []API, modules []string, wsOrigins []
103103
}
104104
go NewWSServer(wsOrigins, handler).Serve(listener)
105105
return listener, handler, err
106-
107106
}
108107

109108
// StartIPCEndpoint starts an IPC endpoint.

rpc/http.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
250250
http.Error(w, err.Error(), code)
251251
return
252252
}
253-
// All checks passed, create a codec that reads direct from the request body
254-
// until EOF, write the response to w, and order the server to process a
253+
// All checks passed, create a codec that reads directly from the request body
254+
// until EOF, writes the response to w, and orders the server to process a
255255
// single request.
256256
ctx := r.Context()
257257
ctx = context.WithValue(ctx, "remote", r.RemoteAddr)

rpc/subscription.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (n *Notifier) takeSubscription() *Subscription {
153153
return n.sub
154154
}
155155

156-
// acticate is called after the subscription ID was sent to client. Notifications are
156+
// activate is called after the subscription ID was sent to client. Notifications are
157157
// buffered before activation. This prevents notifications being sent to the client before
158158
// the subscription ID is sent to the client.
159159
func (n *Notifier) activate() error {
@@ -179,7 +179,7 @@ func (n *Notifier) send(sub *Subscription, data json.RawMessage) error {
179179
})
180180
}
181181

182-
// A Subscription is created by a notifier and tight to that notifier. The client can use
182+
// A Subscription is created by a notifier and tied to that notifier. The client can use
183183
// this subscription to wait for an unsubscribe request for the client, see Err().
184184
type Subscription struct {
185185
ID ID

0 commit comments

Comments
 (0)