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
0651af9d
Commit
0651af9d
authored
Apr 23, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some log statements and disabled additional validation checks
parent
c8180444
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
miner.go
ethminer/miner.go
+8
-4
No files found.
ethminer/miner.go
View file @
0651af9d
...
...
@@ -134,14 +134,18 @@ func (miner *Miner) listener() {
err
:=
miner
.
ethereum
.
StateManager
()
.
ProcessBlock
(
miner
.
block
,
true
)
if
err
!=
nil
{
log
.
Println
(
"Error result from process block:"
,
err
)
miner
.
block
.
State
()
.
Reset
()
}
else
{
// XXX @maranh This is already done in the state manager, why a 2nd time?
if
!
miner
.
ethereum
.
StateManager
()
.
Pow
.
Verify
(
miner
.
block
.
HashNoNonce
(),
miner
.
block
.
Difficulty
,
miner
.
block
.
Nonce
)
{
log
.
Printf
(
"Second stage verification error: Block's nonce is invalid (= %v)
\n
"
,
ethutil
.
Hex
(
miner
.
block
.
Nonce
))
}
/*
// XXX @maranh This is already done in the state manager, why a 2nd time?
if !miner.ethereum.StateManager().Pow.Verify(miner.block.HashNoNonce(), miner.block.Difficulty, miner.block.Nonce) {
log.Printf("Second stage verification error: Block's nonce is invalid (= %v)\n", ethutil.Hex(miner.block.Nonce))
}
*/
miner
.
ethereum
.
Broadcast
(
ethwire
.
MsgBlockTy
,
[]
interface
{}{
miner
.
block
.
Value
()
.
Val
})
log
.
Printf
(
"[MINER] 🔨 Mined block %x
\n
"
,
miner
.
block
.
Hash
())
log
.
Println
(
miner
.
block
)
miner
.
txs
=
[]
*
ethchain
.
Transaction
{}
// Move this somewhere neat
miner
.
block
=
miner
.
ethereum
.
BlockChain
()
.
NewBlock
(
miner
.
coinbase
,
miner
.
txs
)
...
...
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