Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Sia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
NebulousLabs
Sia
Commits
2617c740
Commit
2617c740
authored
9 years ago
by
Luke Champine
Browse files
Options
Downloads
Patches
Plain Diff
less gateway logging
parent
62b0b859
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!827
Ban 0.3.3.x
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gateway/nodes.go
+0
-1
0 additions, 1 deletion
modules/gateway/nodes.go
modules/gateway/rpc.go
+8
-11
8 additions, 11 deletions
modules/gateway/rpc.go
with
8 additions
and
12 deletions
modules/gateway/nodes.go
+
0
−
1
View file @
2617c740
...
...
@@ -73,7 +73,6 @@ func (g *Gateway) requestNodes(conn modules.PeerConn) error {
if
err
:=
encoding
.
ReadObject
(
conn
,
&
nodes
,
maxSharedNodes
*
maxAddrLength
);
err
!=
nil
{
return
err
}
g
.
log
.
Printf
(
"INFO: %v sent us %v nodes"
,
conn
.
RemoteAddr
(),
len
(
nodes
))
id
:=
g
.
mu
.
Lock
()
for
_
,
node
:=
range
nodes
{
g
.
addNode
(
node
)
...
...
This diff is collapsed.
Click to expand it.
modules/gateway/rpc.go
+
8
−
11
View file @
2617c740
...
...
@@ -49,15 +49,7 @@ func (g *Gateway) RPC(addr modules.NetAddress, name string, fn modules.RPCFunc)
return
err
}
// call fn
err
=
fn
(
conn
)
// don't log benign errors
if
err
==
modules
.
ErrDuplicateTransactionSet
||
err
==
modules
.
ErrBlockKnown
{
err
=
nil
}
if
err
!=
nil
{
g
.
log
.
Printf
(
"WARN: calling RPC
\"
%v
\"
on peer %v returned error: %v"
,
name
,
addr
,
err
)
}
return
err
return
fn
(
conn
)
}
// RegisterRPC registers an RPCFunc as a handler for a given identifier. To
...
...
@@ -99,7 +91,6 @@ func (g *Gateway) threadedHandleConn(conn modules.PeerConn) {
defer
conn
.
Close
()
var
id
rpcID
if
err
:=
encoding
.
ReadObject
(
conn
,
&
id
,
8
);
err
!=
nil
{
g
.
log
.
Printf
(
"WARN: could not read RPC identifier from incoming conn %v: %v"
,
conn
.
RemoteAddr
(),
err
)
return
}
// call registered handler for this ID
...
...
@@ -111,7 +102,13 @@ func (g *Gateway) threadedHandleConn(conn modules.PeerConn) {
return
}
if
err
:=
fn
(
conn
);
err
!=
nil
{
// call fn
err
:=
fn
(
conn
)
// don't log benign errors
if
err
==
modules
.
ErrDuplicateTransactionSet
||
err
==
modules
.
ErrBlockKnown
{
err
=
nil
}
if
err
!=
nil
{
g
.
log
.
Printf
(
"WARN: incoming RPC
\"
%v
\"
failed: %v"
,
id
,
err
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment