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
eab8f735
Commit
eab8f735
authored
Mar 24, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Event fixes for miner
parent
576df064
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
worker.go
miner/worker.go
+3
-5
No files found.
miner/worker.go
View file @
eab8f735
...
@@ -126,11 +126,9 @@ out:
...
@@ -126,11 +126,9 @@ out:
case
event
:=
<-
events
.
Chan
()
:
case
event
:=
<-
events
.
Chan
()
:
switch
ev
:=
event
.
(
type
)
{
switch
ev
:=
event
.
(
type
)
{
case
core
.
ChainHeadEvent
:
case
core
.
ChainHeadEvent
:
if
self
.
current
.
block
!=
ev
.
Block
{
self
.
commitNewWork
()
}
case
core
.
NewMinedBlockEvent
:
self
.
commitNewWork
()
self
.
commitNewWork
()
case
core
.
NewMinedBlockEvent
:
//self.commitNewWork()
case
core
.
ChainSideEvent
:
case
core
.
ChainSideEvent
:
self
.
uncleMu
.
Lock
()
self
.
uncleMu
.
Lock
()
self
.
possibleUncles
[
ev
.
Block
.
Hash
()]
=
ev
.
Block
self
.
possibleUncles
[
ev
.
Block
.
Hash
()]
=
ev
.
Block
...
@@ -261,7 +259,7 @@ gasLimit:
...
@@ -261,7 +259,7 @@ gasLimit:
uncles
=
append
(
uncles
,
uncle
.
Header
())
uncles
=
append
(
uncles
,
uncle
.
Header
())
}
}
}
}
minerlogger
.
Infof
(
"commit new work
with %d txs & %d uncles
\n
"
,
tcount
,
len
(
uncles
))
minerlogger
.
Infof
(
"commit new work
on block %v with %d txs & %d uncles
\n
"
,
self
.
current
.
block
.
Number
()
,
tcount
,
len
(
uncles
))
for
_
,
hash
:=
range
badUncles
{
for
_
,
hash
:=
range
badUncles
{
delete
(
self
.
possibleUncles
,
hash
)
delete
(
self
.
possibleUncles
,
hash
)
}
}
...
...
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