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
d83a9a8f
Unverified
Commit
d83a9a8f
authored
Apr 06, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
miner: don't verify our own blocks, trust the engine
parent
3d8de95f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
worker.go
miner/worker.go
+0
-10
No files found.
miner/worker.go
View file @
d83a9a8f
...
...
@@ -279,21 +279,11 @@ func (self *worker) wait() {
go
self
.
mux
.
Post
(
core
.
NewMinedBlockEvent
{
Block
:
block
})
}
else
{
work
.
state
.
Commit
(
self
.
config
.
IsEIP158
(
block
.
Number
()))
parent
:=
self
.
chain
.
GetBlock
(
block
.
ParentHash
(),
block
.
NumberU64
()
-
1
)
if
parent
==
nil
{
log
.
Error
(
"Invalid block found during mining"
)
continue
}
if
err
:=
self
.
engine
.
VerifyHeader
(
self
.
chain
,
block
.
Header
(),
false
);
err
!=
nil
{
log
.
Error
(
"Invalid header on mined block"
,
"err"
,
err
)
continue
}
stat
,
err
:=
self
.
chain
.
WriteBlock
(
block
)
if
err
!=
nil
{
log
.
Error
(
"Failed writing block to chain"
,
"err"
,
err
)
continue
}
// update block hash since it is now available and not when the receipt/log of individual transactions were created
for
_
,
r
:=
range
work
.
receipts
{
for
_
,
l
:=
range
r
.
Logs
{
...
...
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