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
532a74f5
Commit
532a74f5
authored
Mar 14, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved errors. Closes #475
parent
51df765e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
chain_manager.go
core/chain_manager.go
+2
-2
worker.go
miner/worker.go
+3
-5
No files found.
core/chain_manager.go
View file @
532a74f5
...
...
@@ -418,9 +418,9 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
}
h
:=
block
.
Header
()
chainlogger
.
Infof
(
"block #%v process failed (%x)
\n
"
,
h
.
Number
,
h
.
Hash
()[
:
4
])
chainlogger
.
Infoln
(
block
)
chainlogger
.
Infof
(
"INVALID block #%v (%x)
\n
"
,
h
.
Number
,
h
.
Hash
()[
:
4
])
chainlogger
.
Infoln
(
err
)
chainlogger
.
Debufln
(
block
)
return
err
}
block
.
Td
=
td
...
...
miner/worker.go
View file @
532a74f5
...
...
@@ -205,7 +205,7 @@ func (self *worker) commitNewWork() {
// Keep track of transactions which return errors so they can be removed
var
remove
types
.
Transactions
gasLimit
:
for
_
,
tx
:=
range
transactions
{
for
i
,
tx
:=
range
transactions
{
err
:=
self
.
commitTransaction
(
tx
)
switch
{
case
core
.
IsNonceErr
(
err
)
:
...
...
@@ -214,14 +214,12 @@ gasLimit:
// Remove invalid transactions
self
.
chain
.
TxState
()
.
RemoveNonce
(
tx
.
From
(),
tx
.
Nonce
())
remove
=
append
(
remove
,
tx
)
minerlogger
.
Infof
(
"TX (%x) failed. Transaction will be removed
\n
"
,
tx
.
Hash
()[
:
4
])
case
state
.
IsGasLimitErr
(
err
)
:
minerlogger
.
Infof
(
"Gas limit reached for block. %d TXs included in this block
\n
"
,
i
)
// Break on gas limit
break
gasLimit
}
if
err
!=
nil
{
minerlogger
.
Infoln
(
err
)
}
}
self
.
eth
.
TxPool
()
.
RemoveSet
(
remove
)
...
...
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