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
c6ad3aec
Commit
c6ad3aec
authored
May 01, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth,core: changed NewTicker to Tick
parent
b298928c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
chain_manager.go
core/chain_manager.go
+2
-2
sync.go
eth/sync.go
+4
-4
No files found.
core/chain_manager.go
View file @
c6ad3aec
...
...
@@ -669,7 +669,7 @@ func (self *ChainManager) merge(oldBlock, newBlock *types.Block) {
func
(
self
*
ChainManager
)
update
()
{
events
:=
self
.
eventMux
.
Subscribe
(
queueEvent
{})
futureTimer
:=
time
.
NewTicker
(
5
*
time
.
Second
)
futureTimer
:=
time
.
Tick
(
5
*
time
.
Second
)
out
:
for
{
select
{
...
...
@@ -696,7 +696,7 @@ out:
self
.
eventMux
.
Post
(
event
)
}
}
case
<-
futureTimer
.
C
:
case
<-
futureTimer
:
self
.
procFutureBlocks
()
case
<-
self
.
quit
:
break
out
...
...
eth/sync.go
View file @
c6ad3aec
...
...
@@ -15,8 +15,8 @@ func (pm *ProtocolManager) update() {
// itimer is used to determine when to start ignoring `minDesiredPeerCount`
itimer
:=
time
.
NewTimer
(
peerCountTimeout
)
// btimer is used for picking of blocks from the downloader
btimer
:=
time
.
NewTicker
(
blockProcTimer
)
out
:
btimer
:=
time
.
Tick
(
blockProcTimer
)
for
{
select
{
case
<-
pm
.
newPeerCh
:
...
...
@@ -43,10 +43,10 @@ out:
}
else
{
itimer
.
Reset
(
5
*
time
.
Second
)
}
case
<-
btimer
.
C
:
case
<-
btimer
:
go
pm
.
processBlocks
()
case
<-
pm
.
quitSync
:
break
out
return
}
}
}
...
...
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