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
02d629af
Commit
02d629af
authored
Jun 12, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/vm: fixed printable characters using unicode instead
parent
e2c2d8e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
block_processor.go
core/block_processor.go
+0
-4
logger.go
core/vm/logger.go
+2
-2
No files found.
core/block_processor.go
View file @
02d629af
...
...
@@ -71,14 +71,10 @@ func (sm *BlockProcessor) TransitionState(statedb *state.StateDB, parent, block
func
(
self
*
BlockProcessor
)
ApplyTransaction
(
coinbase
*
state
.
StateObject
,
statedb
*
state
.
StateDB
,
block
*
types
.
Block
,
tx
*
types
.
Transaction
,
usedGas
*
big
.
Int
,
transientProcess
bool
)
(
*
types
.
Receipt
,
*
big
.
Int
,
error
)
{
// If we are mining this block and validating we want to set the logs back to 0
//statedb.EmptyLogs()
cb
:=
statedb
.
GetStateObject
(
coinbase
.
Address
())
_
,
gas
,
err
:=
ApplyMessage
(
NewEnv
(
statedb
,
self
.
bc
,
tx
,
block
),
tx
,
cb
)
if
err
!=
nil
&&
(
IsNonceErr
(
err
)
||
state
.
IsGasLimitErr
(
err
)
||
IsInvalidTxErr
(
err
))
{
// If the account is managed, remove the invalid nonce.
//from, _ := tx.From()
//self.bc.TxState().RemoveNonce(from, tx.Nonce())
return
nil
,
nil
,
err
}
...
...
core/vm/logger.go
View file @
02d629af
...
...
@@ -3,7 +3,7 @@ package vm
import
(
"fmt"
"os"
"unicode
/utf8
"
"unicode"
"github.com/ethereum/go-ethereum/common"
)
...
...
@@ -27,7 +27,7 @@ func StdErrFormat(logs []StructLog) {
for
_
,
r
:=
range
data
{
if
r
==
0
{
str
+=
"."
}
else
if
u
tf8
.
ValidRune
(
rune
(
r
))
{
}
else
if
u
nicode
.
IsPrint
(
rune
(
r
))
{
str
+=
fmt
.
Sprintf
(
"%s"
,
string
(
r
))
}
else
{
str
+=
"?"
...
...
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