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
c8695fae
Commit
c8695fae
authored
Feb 15, 2017
by
Felix Lange
Committed by
Jeffrey Wilcke
Feb 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logger: remove Core verbosity level (#3659)
parent
a973d1d5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
18 deletions
+17
-18
database_util.go
core/database_util.go
+1
-1
state_object.go
core/state/state_object.go
+3
-3
statedb.go
core/state/statedb.go
+1
-1
state_transition.go
core/state_transition.go
+1
-1
tx_pool.go
core/tx_pool.go
+7
-7
state.go
light/state.go
+1
-1
state_object.go
light/state_object.go
+3
-3
verbosity.go
logger/verbosity.go
+0
-1
No files found.
core/database_util.go
View file @
c8695fae
...
...
@@ -294,7 +294,7 @@ func GetReceipt(db ethdb.Database, txHash common.Hash) *types.Receipt {
var
receipt
types
.
ReceiptForStorage
err
:=
rlp
.
DecodeBytes
(
data
,
&
receipt
)
if
err
!=
nil
{
glog
.
V
(
logger
.
Core
)
.
Infoln
(
"GetReceipt err:"
,
err
)
glog
.
V
(
logger
.
Debug
)
.
Infoln
(
"GetReceipt err:"
,
err
)
}
return
(
*
types
.
Receipt
)(
&
receipt
)
}
...
...
core/state/state_object.go
View file @
c8695fae
...
...
@@ -135,7 +135,7 @@ func (self *StateObject) markSuicided() {
self
.
onDirty
(
self
.
Address
())
self
.
onDirty
=
nil
}
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v X
\n
"
,
self
.
Address
(),
self
.
Nonce
(),
self
.
Balance
())
}
}
...
...
@@ -253,7 +253,7 @@ func (c *StateObject) AddBalance(amount *big.Int) {
}
c
.
SetBalance
(
new
(
big
.
Int
)
.
Add
(
c
.
Balance
(),
amount
))
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v (+ %v)
\n
"
,
c
.
Address
(),
c
.
Nonce
(),
c
.
Balance
(),
amount
)
}
}
...
...
@@ -266,7 +266,7 @@ func (c *StateObject) SubBalance(amount *big.Int) {
}
c
.
SetBalance
(
new
(
big
.
Int
)
.
Sub
(
c
.
Balance
(),
amount
))
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v (- %v)
\n
"
,
c
.
Address
(),
c
.
Nonce
(),
c
.
Balance
(),
amount
)
}
}
...
...
core/state/statedb.go
View file @
c8695fae
...
...
@@ -451,7 +451,7 @@ func (self *StateDB) createObject(addr common.Address) (newobj, prev *StateObjec
newobj
=
newObject
(
self
,
addr
,
Account
{},
self
.
MarkStateObjectDirty
)
newobj
.
setNonce
(
0
)
// sets the object to dirty
if
prev
==
nil
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"(+) %x
\n
"
,
addr
)
}
self
.
journal
=
append
(
self
.
journal
,
createObjectChange
{
account
:
&
addr
})
...
...
core/state_transition.go
View file @
c8695fae
...
...
@@ -250,7 +250,7 @@ func (self *StateTransition) TransitionDb() (ret []byte, requiredGas, usedGas *b
ret
,
self
.
gas
,
vmerr
=
evm
.
Call
(
sender
,
self
.
to
()
.
Address
(),
self
.
data
,
self
.
gas
,
self
.
value
)
}
if
vmerr
!=
nil
{
glog
.
V
(
logger
.
Core
)
.
Infoln
(
"vm returned with error:"
,
err
)
glog
.
V
(
logger
.
Debug
)
.
Infoln
(
"vm returned with error:"
,
err
)
// The only possible consensus-error would be if there wasn't
// sufficient balance to make the transfer happen. The first
// balance transfer may never fail.
...
...
core/tx_pool.go
View file @
c8695fae
...
...
@@ -514,7 +514,7 @@ func (pool *TxPool) promoteExecutables(state *state.StateDB) {
for
addr
,
list
:=
range
pool
.
queue
{
// Drop all transactions that are deemed too old (low nonce)
for
_
,
tx
:=
range
list
.
Forward
(
state
.
GetNonce
(
addr
))
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Removed old queued transaction: %v"
,
tx
)
}
delete
(
pool
.
all
,
tx
.
Hash
())
...
...
@@ -522,7 +522,7 @@ func (pool *TxPool) promoteExecutables(state *state.StateDB) {
// Drop all transactions that are too costly (low balance)
drops
,
_
:=
list
.
Filter
(
state
.
GetBalance
(
addr
))
for
_
,
tx
:=
range
drops
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Removed unpayable queued transaction: %v"
,
tx
)
}
delete
(
pool
.
all
,
tx
.
Hash
())
...
...
@@ -530,14 +530,14 @@ func (pool *TxPool) promoteExecutables(state *state.StateDB) {
}
// Gather all executable transactions and promote them
for
_
,
tx
:=
range
list
.
Ready
(
pool
.
pendingState
.
GetNonce
(
addr
))
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Promoting queued transaction: %v"
,
tx
)
}
pool
.
promoteTx
(
addr
,
tx
.
Hash
(),
tx
)
}
// Drop all transactions over the allowed limit
for
_
,
tx
:=
range
list
.
Cap
(
int
(
maxQueuedPerAccount
))
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Removed cap-exceeding queued transaction: %v"
,
tx
)
}
delete
(
pool
.
all
,
tx
.
Hash
())
...
...
@@ -651,7 +651,7 @@ func (pool *TxPool) demoteUnexecutables(state *state.StateDB) {
// Drop all transactions that are deemed too old (low nonce)
for
_
,
tx
:=
range
list
.
Forward
(
nonce
)
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Removed old pending transaction: %v"
,
tx
)
}
delete
(
pool
.
all
,
tx
.
Hash
())
...
...
@@ -659,14 +659,14 @@ func (pool *TxPool) demoteUnexecutables(state *state.StateDB) {
// Drop all transactions that are too costly (low balance), and queue any invalids back for later
drops
,
invalids
:=
list
.
Filter
(
state
.
GetBalance
(
addr
))
for
_
,
tx
:=
range
drops
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Removed unpayable pending transaction: %v"
,
tx
)
}
delete
(
pool
.
all
,
tx
.
Hash
())
pendingNofundsCounter
.
Inc
(
1
)
}
for
_
,
tx
:=
range
invalids
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"Demoting pending transaction: %v"
,
tx
)
}
pool
.
enqueueTx
(
tx
.
Hash
(),
tx
)
...
...
light/state.go
View file @
c8695fae
...
...
@@ -239,7 +239,7 @@ func (self *LightState) GetOrNewStateObject(ctx context.Context, addr common.Add
// newStateObject creates a state object whether it exists in the state or not
func
(
self
*
LightState
)
newStateObject
(
addr
common
.
Address
)
*
StateObject
{
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"(+) %x
\n
"
,
addr
)
}
...
...
light/state_object.go
View file @
c8695fae
...
...
@@ -109,7 +109,7 @@ func (self *StateObject) MarkForDeletion() {
self
.
remove
=
true
self
.
dirty
=
true
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v X
\n
"
,
self
.
Address
(),
self
.
nonce
,
self
.
balance
)
}
}
...
...
@@ -158,7 +158,7 @@ func (self *StateObject) SetState(k, value common.Hash) {
func
(
c
*
StateObject
)
AddBalance
(
amount
*
big
.
Int
)
{
c
.
SetBalance
(
new
(
big
.
Int
)
.
Add
(
c
.
balance
,
amount
))
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v (+ %v)
\n
"
,
c
.
Address
(),
c
.
nonce
,
c
.
balance
,
amount
)
}
}
...
...
@@ -167,7 +167,7 @@ func (c *StateObject) AddBalance(amount *big.Int) {
func
(
c
*
StateObject
)
SubBalance
(
amount
*
big
.
Int
)
{
c
.
SetBalance
(
new
(
big
.
Int
)
.
Sub
(
c
.
balance
,
amount
))
if
glog
.
V
(
logger
.
Core
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"%x: #%d %v (- %v)
\n
"
,
c
.
Address
(),
c
.
nonce
,
c
.
balance
,
amount
)
}
}
...
...
logger/verbosity.go
View file @
c8695fae
...
...
@@ -20,7 +20,6 @@ const (
Error
=
iota
+
1
Warn
Info
Core
Debug
Detail
...
...
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