Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
link33
plugin
Commits
5644d6a8
Commit
5644d6a8
authored
Sep 07, 2021
by
hezhengjun
Committed by
vipwzw
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable evm debug configurable
parent
5bbab3de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
chain33.toml
chain33.toml
+2
-0
evm.go
plugin/dapp/evm/executor/evm.go
+4
-3
query.go
plugin/dapp/evm/executor/query.go
+4
-3
No files found.
chain33.toml
View file @
5644d6a8
...
@@ -282,6 +282,8 @@ useBalance=false
...
@@ -282,6 +282,8 @@ useBalance=false
#免交易费模式联盟链允许的最大gas,该配置只对不收取交易费部署方式有效,其他部署方式下该配置不会产生作用
#免交易费模式联盟链允许的最大gas,该配置只对不收取交易费部署方式有效,其他部署方式下该配置不会产生作用
#当前最大为200万
#当前最大为200万
evmGasLimit
=
2000000
evmGasLimit
=
2000000
#evm内部调试输出,指令级的,默认关闭
evmDebugEnable
=
false
[metrics]
[metrics]
#是否使能发送metrics数据的发送
#是否使能发送metrics数据的发送
...
...
plugin/dapp/evm/executor/evm.go
View file @
5644d6a8
...
@@ -21,8 +21,6 @@ import (
...
@@ -21,8 +21,6 @@ import (
)
)
var
(
var
(
evmDebug
=
true
// EvmAddress 本合约地址
// EvmAddress 本合约地址
EvmAddress
=
""
EvmAddress
=
""
)
)
...
@@ -52,7 +50,10 @@ func GetName() string {
...
@@ -52,7 +50,10 @@ func GetName() string {
func
newEVMDriver
()
drivers
.
Driver
{
func
newEVMDriver
()
drivers
.
Driver
{
evm
:=
NewEVMExecutor
()
evm
:=
NewEVMExecutor
()
evm
.
vmCfg
.
Debug
=
evmDebug
cfg
:=
evm
.
GetAPI
()
.
GetConfig
()
conf
:=
types
.
ConfSub
(
cfg
,
evmtypes
.
ExecutorName
)
evmDebugEnable
:=
conf
.
IsEnable
(
"evmDebugEnable"
)
evm
.
vmCfg
.
Debug
=
evmDebugEnable
return
evm
return
evm
}
}
...
...
plugin/dapp/evm/executor/query.go
View file @
5644d6a8
...
@@ -118,11 +118,12 @@ func (evm *EVMExecutor) Query_EvmDebug(in *evmtypes.EvmDebugReq) (types.Message,
...
@@ -118,11 +118,12 @@ func (evm *EVMExecutor) Query_EvmDebug(in *evmtypes.EvmDebugReq) (types.Message,
optype
:=
in
.
Optype
optype
:=
in
.
Optype
if
optype
<
0
{
if
optype
<
0
{
evmDebug
=
false
evm
.
vmCfg
.
Debug
=
false
}
else
if
optype
>
0
{
}
else
if
optype
>
0
{
evmDebug
=
true
evm
.
vmCfg
.
Debug
=
true
}
}
ret
:=
&
evmtypes
.
EvmDebugResp
{
DebugStatus
:
fmt
.
Sprintf
(
"%v"
,
evmDebug
)}
ret
:=
&
evmtypes
.
EvmDebugResp
{
DebugStatus
:
fmt
.
Sprintf
(
"%v"
,
evm
.
vmCfg
.
Debug
)}
return
ret
,
nil
return
ret
,
nil
}
}
...
...
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