Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
d7851e63
Unverified
Commit
d7851e63
authored
Mar 27, 2020
by
rene
Committed by
GitHub
Mar 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graphql, node, rpc: fix typos in comments (#20824)
parent
d3c1e654
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
service.go
graphql/service.go
+1
-1
node.go
node/node.go
+3
-3
endpoints.go
rpc/endpoints.go
+0
-1
http.go
rpc/http.go
+2
-2
subscription.go
rpc/subscription.go
+2
-2
No files found.
graphql/service.go
View file @
d7851e63
...
...
@@ -35,7 +35,7 @@ type Service struct {
cors
[]
string
// Allowed CORS domains
vhosts
[]
string
// Recognised vhosts
timeouts
rpc
.
HTTPTimeouts
// Timeout settings for HTTP requests.
backend
ethapi
.
Backend
// The backend that queries will operate on
n
.
backend
ethapi
.
Backend
// The backend that queries will operate on.
handler
http
.
Handler
// The `http.Handler` used to answer queries.
listener
net
.
Listener
// The listening socket.
}
...
...
node/node.go
View file @
d7851e63
...
...
@@ -158,7 +158,7 @@ func (n *Node) Register(constructor ServiceConstructor) error {
return
nil
}
// Start create a live P2P node and starts running it.
// Start create
s
a live P2P node and starts running it.
func
(
n
*
Node
)
Start
()
error
{
n
.
lock
.
Lock
()
defer
n
.
lock
.
Unlock
()
...
...
@@ -235,7 +235,7 @@ func (n *Node) Start() error {
// Mark the service started for potential cleanup
started
=
append
(
started
,
kind
)
}
// Lastly start the configured RPC interfaces
// Lastly
,
start the configured RPC interfaces
if
err
:=
n
.
startRPC
(
services
);
err
!=
nil
{
for
_
,
service
:=
range
services
{
service
.
Stop
()
...
...
@@ -274,7 +274,7 @@ func (n *Node) openDataDir() error {
return
nil
}
// startRPC is a helper method to start all the various RPC endpoint during node
// startRPC is a helper method to start all the various RPC endpoint
s
during node
// startup. It's not meant to be called at any time afterwards as it makes certain
// assumptions about the state of the node.
func
(
n
*
Node
)
startRPC
(
services
map
[
reflect
.
Type
]
Service
)
error
{
...
...
rpc/endpoints.go
View file @
d7851e63
...
...
@@ -103,7 +103,6 @@ func StartWSEndpoint(endpoint string, apis []API, modules []string, wsOrigins []
}
go
NewWSServer
(
wsOrigins
,
handler
)
.
Serve
(
listener
)
return
listener
,
handler
,
err
}
// StartIPCEndpoint starts an IPC endpoint.
...
...
rpc/http.go
View file @
d7851e63
...
...
@@ -250,8 +250,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http
.
Error
(
w
,
err
.
Error
(),
code
)
return
}
// All checks passed, create a codec that reads direct from the request body
// until EOF, write
the response to w, and order
the server to process a
// All checks passed, create a codec that reads direct
ly
from the request body
// until EOF, write
s the response to w, and orders
the server to process a
// single request.
ctx
:=
r
.
Context
()
ctx
=
context
.
WithValue
(
ctx
,
"remote"
,
r
.
RemoteAddr
)
...
...
rpc/subscription.go
View file @
d7851e63
...
...
@@ -153,7 +153,7 @@ func (n *Notifier) takeSubscription() *Subscription {
return
n
.
sub
}
// acti
c
ate is called after the subscription ID was sent to client. Notifications are
// acti
v
ate is called after the subscription ID was sent to client. Notifications are
// buffered before activation. This prevents notifications being sent to the client before
// the subscription ID is sent to the client.
func
(
n
*
Notifier
)
activate
()
error
{
...
...
@@ -179,7 +179,7 @@ func (n *Notifier) send(sub *Subscription, data json.RawMessage) error {
})
}
// A Subscription is created by a notifier and ti
ght
to that notifier. The client can use
// A Subscription is created by a notifier and ti
ed
to that notifier. The client can use
// this subscription to wait for an unsubscribe request for the client, see Err().
type
Subscription
struct
{
ID
ID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment