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
fc1057d4
Commit
fc1057d4
authored
Sep 06, 2021
by
hezhengjun
Committed by
33cn
Sep 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add gas limit set for permission blockchain and fee free
parent
1a7f3fa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
chain33.toml
chain33.toml
+5
-0
exec.go
plugin/dapp/evm/executor/exec.go
+9
-0
No files found.
chain33.toml
View file @
fc1057d4
...
@@ -278,6 +278,11 @@ paraConsensusStopBlocks=30000
...
@@ -278,6 +278,11 @@ paraConsensusStopBlocks=30000
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
useBalance
=
false
useBalance
=
false
[exec.sub.evm]
#免交易费模式联盟链允许的最大gas,该配置只对不收取交易费部署方式有效,其他部署方式下该配置不会产生作用
#当前最大为200万
evmGasLimit
=
2000000
[metrics]
[metrics]
#是否使能发送metrics数据的发送
#是否使能发送metrics数据的发送
enableMetrics
=
false
enableMetrics
=
false
...
...
plugin/dapp/evm/executor/exec.go
View file @
fc1057d4
...
@@ -213,6 +213,15 @@ func (evm *EVMExecutor) GetMessage(tx *types.Transaction, index int, fromPtr *co
...
@@ -213,6 +213,15 @@ func (evm *EVMExecutor) GetMessage(tx *types.Transaction, index int, fromPtr *co
gasPrice
:=
action
.
GasPrice
gasPrice
:=
action
.
GasPrice
if
gasLimit
==
0
{
if
gasLimit
==
0
{
gasLimit
=
uint64
(
evm
.
GetTxFee
(
tx
,
index
))
gasLimit
=
uint64
(
evm
.
GetTxFee
(
tx
,
index
))
//如果未设置交易费,则尝试读取免交易费联盟链模式下的gas设置
if
0
==
gasLimit
{
cfg
:=
evm
.
GetAPI
()
.
GetConfig
()
conf
:=
types
.
ConfSub
(
cfg
,
evmtypes
.
ExecutorName
)
gasLimit
=
uint64
(
conf
.
GInt
(
"evmGasLimit"
))
if
0
==
gasLimit
{
panic
(
"evmGasLimit is not configured for permission blockchain"
)
}
}
}
}
if
gasPrice
==
0
{
if
gasPrice
==
0
{
gasPrice
=
uint32
(
1
)
gasPrice
=
uint32
(
1
)
...
...
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