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
e4d79485
Commit
e4d79485
authored
Jan 21, 2016
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
node, rpc/api: add debug_vmodule, move admin_verbosity to debug_verbosity
parent
0edcbc79
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
41 deletions
+18
-41
api.go
node/api.go
+5
-0
admin.go
rpc/api/admin.go
+0
-12
admin_args.go
rpc/api/admin_args.go
+0
-22
admin_js.go
rpc/api/admin_js.go
+0
-6
debug_js.go
rpc/api/debug_js.go
+13
-1
No files found.
node/api.go
View file @
e4d79485
...
...
@@ -138,6 +138,11 @@ func (api *PrivateDebugAPI) Verbosity(level int) {
glog
.
SetV
(
level
)
}
// Vmodule updates the node's logging verbosity pattern.
func
(
api
*
PrivateDebugAPI
)
Vmodule
(
pattern
string
)
error
{
return
glog
.
SetVmodule
(
pattern
)
}
// PublicDebugAPI is the collection of debugging related API methods exposed over
// both secure and unsecure RPC channels.
type
PublicDebugAPI
struct
{
...
...
rpc/api/admin.go
View file @
e4d79485
...
...
@@ -31,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/rlp"
...
...
@@ -55,7 +54,6 @@ var (
"admin_nodeInfo"
:
(
*
adminApi
)
.
NodeInfo
,
"admin_exportChain"
:
(
*
adminApi
)
.
ExportChain
,
"admin_importChain"
:
(
*
adminApi
)
.
ImportChain
,
"admin_verbosity"
:
(
*
adminApi
)
.
Verbosity
,
"admin_setSolc"
:
(
*
adminApi
)
.
SetSolc
,
"admin_datadir"
:
(
*
adminApi
)
.
DataDir
,
"admin_startRPC"
:
(
*
adminApi
)
.
StartRPC
,
...
...
@@ -225,16 +223,6 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) {
return
true
,
nil
}
func
(
self
*
adminApi
)
Verbosity
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
args
:=
new
(
VerbosityArgs
)
if
err
:=
self
.
coder
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
return
nil
,
shared
.
NewDecodeParamError
(
err
.
Error
())
}
glog
.
SetV
(
args
.
Level
)
return
true
,
nil
}
func
(
self
*
adminApi
)
SetSolc
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
args
:=
new
(
SetSolcArgs
)
if
err
:=
self
.
coder
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
...
...
rpc/api/admin_args.go
View file @
e4d79485
...
...
@@ -69,28 +69,6 @@ func (args *ImportExportChainArgs) UnmarshalJSON(b []byte) (err error) {
return
nil
}
type
VerbosityArgs
struct
{
Level
int
}
func
(
args
*
VerbosityArgs
)
UnmarshalJSON
(
b
[]
byte
)
(
err
error
)
{
var
obj
[]
interface
{}
if
err
:=
json
.
Unmarshal
(
b
,
&
obj
);
err
!=
nil
{
return
shared
.
NewDecodeParamError
(
err
.
Error
())
}
if
len
(
obj
)
!=
1
{
return
shared
.
NewDecodeParamError
(
"Expected enode as argument"
)
}
level
,
err
:=
numString
(
obj
[
0
])
if
err
==
nil
{
args
.
Level
=
int
(
level
.
Int64
())
}
return
nil
}
type
SetSolcArgs
struct
{
Path
string
}
...
...
rpc/api/admin_js.go
View file @
e4d79485
...
...
@@ -45,12 +45,6 @@ web3._extend({
params: 2,
inputFormatter: [null, null]
}),
new web3._extend.Method({
name: 'verbosity',
call: 'admin_verbosity',
params: 1,
inputFormatter: [web3._extend.utils.fromDecimal]
}),
new web3._extend.Method({
name: 'setSolc',
call: 'admin_setSolc',
...
...
rpc/api/debug_js.go
View file @
e4d79485
...
...
@@ -62,7 +62,19 @@ web3._extend({
call: 'debug_metrics',
params: 1,
inputFormatter: [null]
})
}),
new web3._extend.Method({
name: 'verbosity',
call: 'debug_verbosity',
params: 1,
inputFormatter: [web3._extend.utils.fromDecimal]
}),
new web3._extend.Method({
name: 'vmodule',
call: 'debug_vmodule',
params: 1,
inputFormatter: [null]
}),
],
properties:
[
...
...
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