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
717d2f6f
Commit
717d2f6f
authored
Dec 01, 2016
by
Péter Szilágyi
Committed by
GitHub
Dec 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3390 from bas-vk/statsd-stop
ethstats: check if received event is valid
parents
8cb95cb9
56b44619
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ethstats.go
ethstats/ethstats.go
+9
-1
No files found.
ethstats/ethstats.go
View file @
717d2f6f
...
...
@@ -145,13 +145,21 @@ func (s *Service) loop() {
glog
.
V
(
logger
.
Warn
)
.
Infof
(
"Full stats report failed: %v"
,
err
)
}
case
head
:=
<-
headSub
.
Chan
()
:
if
head
==
nil
{
// node stopped
conn
.
Close
()
return
}
if
err
=
s
.
reportBlock
(
out
,
head
.
Data
.
(
core
.
ChainHeadEvent
)
.
Block
);
err
!=
nil
{
glog
.
V
(
logger
.
Warn
)
.
Infof
(
"Block stats report failed: %v"
,
err
)
}
if
err
=
s
.
reportPending
(
out
);
err
!=
nil
{
glog
.
V
(
logger
.
Warn
)
.
Infof
(
"Post-block transaction stats report failed: %v"
,
err
)
}
case
<-
txSub
.
Chan
()
:
case
ev
:=
<-
txSub
.
Chan
()
:
if
ev
==
nil
{
// node stopped
conn
.
Close
()
return
}
// Exhaust events to avoid reporting too frequently
for
exhausted
:=
false
;
!
exhausted
;
{
select
{
...
...
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