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
6a3fd8fe
Commit
6a3fd8fe
authored
Dec 27, 2019
by
jiangpeng
Committed by
vipwzw
Dec 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync chain33 tx fee config
parent
54e4e578
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
67 additions
and
107 deletions
+67
-107
chain33.para.toml
chain33.para.toml
+1
-3
chain33.toml
chain33.toml
+7
-6
chain33.test.toml
plugin/consensus/dpos/chain33.test.toml
+1
-3
node_test.go
plugin/consensus/dpos/node_test.go
+2
-6
para_test.go
plugin/consensus/para/para_test.go
+2
-2
paracommitmsg.go
plugin/consensus/para/paracommitmsg.go
+2
-2
chain33.test.toml
plugin/consensus/pbft/chain33.test.toml
+1
-3
chain33.test.toml
plugin/consensus/raft/chain33.test.toml
+2
-5
chain33.test.toml
plugin/consensus/tendermint/chain33.test.toml
+1
-3
chain33.cfg.toml
plugin/consensus/ticket/testdata/chain33.cfg.toml
+3
-5
authority_test.go
plugin/dapp/cert/authority/authority_test.go
+1
-1
chain33.auth.test.toml
plugin/dapp/cert/authority/test/chain33.auth.test.toml
+1
-3
vote_test.go
plugin/dapp/dposvote/commands/vote_test.go
+1
-3
evm.go
plugin/dapp/evm/commands/evm.go
+2
-2
rpc.go
plugin/dapp/evm/rpc/rpc.go
+3
-3
game_test.go
plugin/dapp/guess/commands/game_test.go
+4
-8
guess_test.go
plugin/dapp/guess/rpc/guess_test.go
+4
-8
hashlock.go
plugin/dapp/hashlock/commands/hashlock.go
+3
-3
chain33.para.test.toml
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
+1
-3
paracross_test.go
plugin/dapp/paracross/executor/paracross_test.go
+2
-2
cfg.go
plugin/dapp/paracross/testnode/cfg.go
+1
-3
paracross.go
plugin/dapp/paracross/types/paracross.go
+1
-1
privacy.go
plugin/dapp/privacy/wallet/privacy.go
+3
-3
privacy_test.go
plugin/dapp/privacy/wallet/privacy_test.go
+1
-1
relayd.go
plugin/dapp/relay/cmd/relayd/relayd/relayd.go
+1
-1
retrieve.go
plugin/dapp/retrieve/cmd/retrieve.go
+4
-4
chain33.cfg.toml
plugin/dapp/ticket/executor/testdata/chain33.cfg.toml
+1
-3
rpc_test.go
plugin/dapp/ticket/rpc/rpc_test.go
+1
-3
types.go
plugin/dapp/unfreeze/types/types.go
+3
-3
valnode.go
plugin/dapp/valnode/commands/valnode.go
+1
-1
cache_test.go
plugin/mempool/price/cache_test.go
+1
-1
chain33.test.toml
plugin/mempool/price/chain33.test.toml
+1
-3
mempool.go
plugin/mempool/price/mempool.go
+1
-1
cache_test.go
plugin/mempool/score/cache_test.go
+1
-1
chain33.test.toml
plugin/mempool/score/chain33.test.toml
+1
-3
mempool.go
plugin/mempool/score/mempool.go
+1
-1
No files found.
chain33.para.toml
View file @
6a3fd8fe
...
@@ -70,7 +70,7 @@ grpcFuncWhitelist=["*"]
...
@@ -70,7 +70,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"para"
name
=
"para"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
10000
maxTxNumPerAccount
=
10000
[consensus]
[consensus]
...
@@ -162,8 +162,6 @@ signType="secp256k1"
...
@@ -162,8 +162,6 @@ signType="secp256k1"
minerdisable
=
true
minerdisable
=
true
[exec]
[exec]
isFree
=
true
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
...
...
chain33.toml
View file @
6a3fd8fe
...
@@ -66,8 +66,12 @@ grpcFuncWhitelist=["*"]
...
@@ -66,8 +66,12 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"price"
name
=
"price"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
maxTxNumPerAccount
=
100
maxTxNumPerAccount
=
100
# 最小得交易手续费率,这个没有默认值,必填,一般是0.001 coins
minTxFeeRate
=
100000
# 最大的交易手续费率, 0.1 coins
maxTxFeeRate
=
10000000
# 单笔交易最大的手续费, 10 coins
maxTxFee
=
1000000000
maxTxFee
=
1000000000
isLevelFee
=
true
isLevelFee
=
true
[mempool.sub.timeline]
[mempool.sub.timeline]
...
@@ -198,9 +202,6 @@ minerwhitelist=["*"]
...
@@ -198,9 +202,6 @@ minerwhitelist=["*"]
rescanMultisigAddr
=
false
rescanMultisigAddr
=
false
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
maxExecFee
=
1000000000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
@@ -229,8 +230,8 @@ genesis="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
...
@@ -229,8 +230,8 @@ genesis="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
[exec.sub.manage]
[exec.sub.manage]
superManager
=[
superManager
=[
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
]
]
[exec.sub.paracross]
[exec.sub.paracross]
...
...
plugin/consensus/dpos/chain33.test.toml
View file @
6a3fd8fe
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
[consensus]
[consensus]
name
=
"tendermint"
name
=
"tendermint"
...
@@ -135,8 +135,6 @@ minerdisable=false
...
@@ -135,8 +135,6 @@ minerdisable=false
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
...
plugin/consensus/dpos/node_test.go
View file @
6a3fd8fe
...
@@ -103,7 +103,7 @@ grpcFuncWhitelist=["*"]
...
@@ -103,7 +103,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name="timeline"
name="timeline"
poolCacheSize=10240
poolCacheSize=10240
minTxFee=100000
minTxFee
Rate
=100000
[consensus]
[consensus]
name="dpos"
name="dpos"
...
@@ -176,8 +176,6 @@ minerdisable=false
...
@@ -176,8 +176,6 @@ minerdisable=false
minerwhitelist=["*"]
minerwhitelist=["*"]
[exec]
[exec]
isFree=false
minExecFee=100000
enableStat=false
enableStat=false
enableMVCC=false
enableMVCC=false
alias=["token1:token","token2:token","token3:token"]
alias=["token1:token","token2:token","token3:token"]
...
@@ -256,7 +254,7 @@ grpcFuncWhitelist=["*"]
...
@@ -256,7 +254,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name="timeline"
name="timeline"
poolCacheSize=10240
poolCacheSize=10240
minTxFee=100000
minTxFee
Rate
=100000
[consensus]
[consensus]
name="dpos"
name="dpos"
...
@@ -350,8 +348,6 @@ minerdisable=false
...
@@ -350,8 +348,6 @@ minerdisable=false
minerwhitelist=["*"]
minerwhitelist=["*"]
[exec]
[exec]
isFree=false
minExecFee=100000
enableStat=false
enableStat=false
enableMVCC=false
enableMVCC=false
alias=["token1:token","token2:token","token3:token"]
alias=["token1:token","token2:token","token3:token"]
...
...
plugin/consensus/para/para_test.go
View file @
6a3fd8fe
...
@@ -74,11 +74,11 @@ func createCrossParaTempTx(cfg *types.Chain33Config, to string, amount int64) (*
...
@@ -74,11 +74,11 @@ func createCrossParaTempTx(cfg *types.Chain33Config, to string, amount int64) (*
func
createTxsGroup
(
cfg
*
types
.
Chain33Config
,
txs
[]
*
types
.
Transaction
)
([]
*
types
.
Transaction
,
error
)
{
func
createTxsGroup
(
cfg
*
types
.
Chain33Config
,
txs
[]
*
types
.
Transaction
)
([]
*
types
.
Transaction
,
error
)
{
group
,
err
:=
types
.
CreateTxGroup
(
txs
,
cfg
.
G
Int
(
"MinFee"
))
group
,
err
:=
types
.
CreateTxGroup
(
txs
,
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
err
=
group
.
Check
(
cfg
,
0
,
cfg
.
G
Int
(
"MinFee"
),
cfg
.
GInt
(
"MaxFee"
))
err
=
group
.
Check
(
cfg
,
0
,
cfg
.
G
etMinTxFeeRate
(),
cfg
.
GetMaxTxFee
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
plugin/consensus/para/paracommitmsg.go
View file @
6a3fd8fe
...
@@ -397,12 +397,12 @@ func (client *commitMsgClient) getTxsGroup(txsArr *types.Transactions) (*types.T
...
@@ -397,12 +397,12 @@ func (client *commitMsgClient) getTxsGroup(txsArr *types.Transactions) (*types.T
return
tx
,
nil
return
tx
,
nil
}
}
cfg
:=
client
.
paraClient
.
GetAPI
()
.
GetConfig
()
cfg
:=
client
.
paraClient
.
GetAPI
()
.
GetConfig
()
group
,
err
:=
types
.
CreateTxGroup
(
txsArr
.
Txs
,
cfg
.
G
Int
(
"MinFee"
))
group
,
err
:=
types
.
CreateTxGroup
(
txsArr
.
Txs
,
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
plog
.
Error
(
"para CreateTxGroup"
,
"err"
,
err
.
Error
())
plog
.
Error
(
"para CreateTxGroup"
,
"err"
,
err
.
Error
())
return
nil
,
err
return
nil
,
err
}
}
err
=
group
.
Check
(
cfg
,
0
,
cfg
.
G
Int
(
"MinFee"
),
cfg
.
GInt
(
"MaxFee"
))
err
=
group
.
Check
(
cfg
,
0
,
cfg
.
G
etMinTxFeeRate
(),
cfg
.
GetMaxTxFee
(
))
if
err
!=
nil
{
if
err
!=
nil
{
plog
.
Error
(
"para CheckTxGroup"
,
"err"
,
err
.
Error
())
plog
.
Error
(
"para CheckTxGroup"
,
"err"
,
err
.
Error
())
return
nil
,
err
return
nil
,
err
...
...
plugin/consensus/pbft/chain33.test.toml
View file @
6a3fd8fe
...
@@ -53,7 +53,7 @@ verMax=119
...
@@ -53,7 +53,7 @@ verMax=119
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
[rpc]
[rpc]
jrpcBindAddr
=
"localhost:8801"
jrpcBindAddr
=
"localhost:8801"
...
@@ -104,8 +104,6 @@ minerdisable=false
...
@@ -104,8 +104,6 @@ minerdisable=false
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
...
plugin/consensus/raft/chain33.test.toml
View file @
6a3fd8fe
...
@@ -61,7 +61,7 @@ grpcFuncWhitelist=["*"]
...
@@ -61,7 +61,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
100
maxTxNumPerAccount
=
100
[mempool.sub.timeline]
[mempool.sub.timeline]
...
@@ -140,8 +140,6 @@ minerWaitTime="1s"
...
@@ -140,8 +140,6 @@ minerWaitTime="1s"
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
@@ -167,4 +165,4 @@ superManager=[
...
@@ -167,4 +165,4 @@ superManager=[
[exec.sub.autonomy]
[exec.sub.autonomy]
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
useBalance
=
false
useBalance
=
false
\ No newline at end of file
plugin/consensus/tendermint/chain33.test.toml
View file @
6a3fd8fe
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
[consensus]
[consensus]
name
=
"tendermint"
name
=
"tendermint"
...
@@ -117,8 +117,6 @@ minerdisable=false
...
@@ -117,8 +117,6 @@ minerdisable=false
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
...
plugin/consensus/ticket/testdata/chain33.cfg.toml
View file @
6a3fd8fe
...
@@ -63,7 +63,7 @@ grpcFuncWhitelist=["*"]
...
@@ -63,7 +63,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
10000
maxTxNumPerAccount
=
10000
[consensus]
[consensus]
...
@@ -149,8 +149,6 @@ minerwhitelist=["*"]
...
@@ -149,8 +149,6 @@ minerwhitelist=["*"]
minerWaitTime
=
"1s"
minerWaitTime
=
"1s"
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
@@ -179,8 +177,8 @@ signType="auth_ecdsa"
...
@@ -179,8 +177,8 @@ signType="auth_ecdsa"
[exec.sub.manage]
[exec.sub.manage]
superManager
=[
superManager
=[
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
]
]
...
...
plugin/dapp/cert/authority/authority_test.go
View file @
6a3fd8fe
...
@@ -325,7 +325,7 @@ func TestValidateCerts(t *testing.T) {
...
@@ -325,7 +325,7 @@ func TestValidateCerts(t *testing.T) {
t.Errorf("init env failed, error:%s", err)
t.Errorf("init env failed, error:%s", err)
}
}
prev := types.G
Int("MinFee"
)
prev := types.G
etMinTxFeeRate(
)
types.SetMinFee(0)
types.SetMinFee(0)
defer types.SetMinFee(prev)
defer types.SetMinFee(prev)
...
...
plugin/dapp/cert/authority/test/chain33.auth.test.toml
View file @
6a3fd8fe
...
@@ -57,7 +57,7 @@ grpcFuncWhitelist=["*"]
...
@@ -57,7 +57,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
0
minTxFee
Rate
=
0
[consensus]
[consensus]
name
=
"solo"
name
=
"solo"
...
@@ -81,8 +81,6 @@ signType="secp256k1"
...
@@ -81,8 +81,6 @@ signType="secp256k1"
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
true
minExecFee
=
0
enableStat
=
false
enableStat
=
false
[exec.sub.cert]
[exec.sub.cert]
...
...
plugin/dapp/dposvote/commands/vote_test.go
View file @
6a3fd8fe
...
@@ -116,7 +116,7 @@ grpcFuncWhitelist=["*"]
...
@@ -116,7 +116,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name="timeline"
name="timeline"
poolCacheSize=10240
poolCacheSize=10240
minTxFee=100000
minTxFee
Rate
=100000
[consensus]
[consensus]
name="tendermint"
name="tendermint"
...
@@ -189,8 +189,6 @@ minerdisable=false
...
@@ -189,8 +189,6 @@ minerdisable=false
minerwhitelist=["*"]
minerwhitelist=["*"]
[exec]
[exec]
isFree=false
minExecFee=100000
enableStat=false
enableStat=false
enableMVCC=false
enableMVCC=false
alias=["token1:token","token2:token","token3:token"]
alias=["token1:token","token2:token","token3:token"]
...
...
plugin/dapp/evm/commands/evm.go
View file @
6a3fd8fe
...
@@ -289,7 +289,7 @@ func createContract(cmd *cobra.Command, args []string) {
...
@@ -289,7 +289,7 @@ func createContract(cmd *cobra.Command, args []string) {
func
createEvmTx
(
cfg
*
types
.
Chain33Config
,
action
proto
.
Message
,
execer
,
caller
,
addr
,
expire
,
rpcLaddr
string
,
fee
uint64
)
(
string
,
error
)
{
func
createEvmTx
(
cfg
*
types
.
Chain33Config
,
action
proto
.
Message
,
execer
,
caller
,
addr
,
expire
,
rpcLaddr
string
,
fee
uint64
)
(
string
,
error
)
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
types
.
Encode
(
action
),
Fee
:
0
,
To
:
addr
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
types
.
Encode
(
action
),
Fee
:
0
,
To
:
addr
}
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
tx
.
Fee
<
int64
(
fee
)
{
if
tx
.
Fee
<
int64
(
fee
)
{
tx
.
Fee
+=
int64
(
fee
)
tx
.
Fee
+=
int64
(
fee
)
}
}
...
@@ -341,7 +341,7 @@ func createEvmTransferTx(cfg *types.Chain33Config, cmd *cobra.Command, caller, e
...
@@ -341,7 +341,7 @@ func createEvmTransferTx(cfg *types.Chain33Config, cmd *cobra.Command, caller, e
}
}
var
err
error
var
err
error
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
}
}
...
...
plugin/dapp/evm/rpc/rpc.go
View file @
6a3fd8fe
...
@@ -33,7 +33,7 @@ func (c *channelClient) Create(ctx context.Context, in evmtypes.EvmContractCreat
...
@@ -33,7 +33,7 @@ func (c *channelClient) Create(ctx context.Context, in evmtypes.EvmContractCreat
addr
:=
address
.
ExecAddress
(
cfg
.
ExecName
(
in
.
ParaName
+
"evm"
))
addr
:=
address
.
ExecAddress
(
cfg
.
ExecName
(
in
.
ParaName
+
"evm"
))
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
types
.
Encode
(
&
action
),
Fee
:
0
,
To
:
addr
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
types
.
Encode
(
&
action
),
Fee
:
0
,
To
:
addr
}
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
tx
.
Fee
<
in
.
Fee
{
if
tx
.
Fee
<
in
.
Fee
{
tx
.
Fee
+=
in
.
Fee
tx
.
Fee
+=
in
.
Fee
}
}
...
@@ -62,7 +62,7 @@ func (c *channelClient) Call(ctx context.Context, in evmtypes.EvmContractCallReq
...
@@ -62,7 +62,7 @@ func (c *channelClient) Call(ctx context.Context, in evmtypes.EvmContractCallReq
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
in
.
Exec
),
Payload
:
types
.
Encode
(
&
action
),
Fee
:
0
,
To
:
toAddr
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
in
.
Exec
),
Payload
:
types
.
Encode
(
&
action
),
Fee
:
0
,
To
:
toAddr
}
cfg
:=
c
.
GetConfig
()
cfg
:=
c
.
GetConfig
()
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
_
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
tx
.
Fee
<
feeInt64
{
if
tx
.
Fee
<
feeInt64
{
tx
.
Fee
+=
feeInt64
tx
.
Fee
+=
feeInt64
}
}
...
@@ -96,7 +96,7 @@ func (c *channelClient) Transfer(ctx context.Context, in evmtypes.EvmContractTra
...
@@ -96,7 +96,7 @@ func (c *channelClient) Transfer(ctx context.Context, in evmtypes.EvmContractTra
}
}
var
err
error
var
err
error
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
plugin/dapp/guess/commands/game_test.go
View file @
6a3fd8fe
...
@@ -144,7 +144,7 @@ name="timeline"
...
@@ -144,7 +144,7 @@ name="timeline"
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# timeline 是默认的先来先进的按时间排序
# timeline 是默认的先来先进的按时间排序
...
@@ -152,7 +152,7 @@ maxTxNumPerAccount=10000
...
@@ -152,7 +152,7 @@ maxTxNumPerAccount=10000
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# score是分数队列模式(分数=常量a*手续费/交易字节数-常量b*时间*定量c,按分数排队,高的优先,常量a,b和定量c可配置),按分数来排序
# score是分数队列模式(分数=常量a*手续费/交易字节数-常量b*时间*定量c,按分数排队,高的优先,常量a,b和定量c可配置),按分数来排序
...
@@ -160,7 +160,7 @@ maxTxNumPerAccount=10000
...
@@ -160,7 +160,7 @@ maxTxNumPerAccount=10000
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# 时间占价格比例
# 时间占价格比例
...
@@ -174,7 +174,7 @@ pricePower=1
...
@@ -174,7 +174,7 @@ pricePower=1
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
[consensus]
[consensus]
...
@@ -256,10 +256,6 @@ minerdisable=false
...
@@ -256,10 +256,6 @@ minerdisable=false
# 允许购买ticket挖矿的白名单地址,默认配置“*”,允许所有地址购买
# 允许购买ticket挖矿的白名单地址,默认配置“*”,允许所有地址购买
minerwhitelist=["*"]
minerwhitelist=["*"]
[exec]
[exec]
#执行器执行是否免费
isFree=false
#执行器执行所需最小费用,低于Mempool和Wallet设置的MinFee,在minExecFee = 0 的情况下,isFree = true才会生效
minExecFee=100000
#是否开启stat插件
#是否开启stat插件
enableStat=false
enableStat=false
#是否开启MVCC插件
#是否开启MVCC插件
...
...
plugin/dapp/guess/rpc/guess_test.go
View file @
6a3fd8fe
...
@@ -147,7 +147,7 @@ name="timeline"
...
@@ -147,7 +147,7 @@ name="timeline"
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# timeline 是默认的先来先进的按时间排序
# timeline 是默认的先来先进的按时间排序
...
@@ -155,7 +155,7 @@ maxTxNumPerAccount=10000
...
@@ -155,7 +155,7 @@ maxTxNumPerAccount=10000
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# score是分数队列模式(分数=常量a*手续费/交易字节数-常量b*时间*定量c,按分数排队,高的优先,常量a,b和定量c可配置),按分数来排序
# score是分数队列模式(分数=常量a*手续费/交易字节数-常量b*时间*定量c,按分数排队,高的优先,常量a,b和定量c可配置),按分数来排序
...
@@ -163,7 +163,7 @@ maxTxNumPerAccount=10000
...
@@ -163,7 +163,7 @@ maxTxNumPerAccount=10000
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
# 时间占价格比例
# 时间占价格比例
...
@@ -177,7 +177,7 @@ pricePower=1
...
@@ -177,7 +177,7 @@ pricePower=1
# mempool缓存容量大小,默认10240
# mempool缓存容量大小,默认10240
poolCacheSize=10240
poolCacheSize=10240
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
# 最小得交易手续费用,这个没有默认值,必填,一般是100000
minTxFee=100000
minTxFee
Rate
=100000
# 每个账户在mempool中得最大交易数量,默认100
# 每个账户在mempool中得最大交易数量,默认100
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
[consensus]
[consensus]
...
@@ -259,10 +259,6 @@ minerdisable=false
...
@@ -259,10 +259,6 @@ minerdisable=false
# 允许购买ticket挖矿的白名单地址,默认配置“*”,允许所有地址购买
# 允许购买ticket挖矿的白名单地址,默认配置“*”,允许所有地址购买
minerwhitelist=["*"]
minerwhitelist=["*"]
[exec]
[exec]
#执行器执行是否免费
isFree=false
#执行器执行所需最小费用,低于Mempool和Wallet设置的MinFee,在minExecFee = 0 的情况下,isFree = true才会生效
minExecFee=100000
#是否开启stat插件
#是否开启stat插件
enableStat=false
enableStat=false
#是否开启MVCC插件
#是否开启MVCC插件
...
...
plugin/dapp/hashlock/commands/hashlock.go
View file @
6a3fd8fe
...
@@ -69,7 +69,7 @@ func hashlockLockCmd(cmd *cobra.Command, args []string) {
...
@@ -69,7 +69,7 @@ func hashlockLockCmd(cmd *cobra.Command, args []string) {
delay
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"delay"
)
delay
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"delay"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
@@ -129,7 +129,7 @@ func hashlockUnlockCmd(cmd *cobra.Command, args []string) {
...
@@ -129,7 +129,7 @@ func hashlockUnlockCmd(cmd *cobra.Command, args []string) {
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
@@ -172,7 +172,7 @@ func hashlockSendCmd(cmd *cobra.Command, args []string) {
...
@@ -172,7 +172,7 @@ func hashlockSendCmd(cmd *cobra.Command, args []string) {
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
...
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
View file @
6a3fd8fe
...
@@ -65,7 +65,7 @@ mainnetJrpcAddr= "http://localhost:8801"
...
@@ -65,7 +65,7 @@ mainnetJrpcAddr= "http://localhost:8801"
[mempool]
[mempool]
name
=
"para"
name
=
"para"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
10000
maxTxNumPerAccount
=
10000
[consensus]
[consensus]
...
@@ -131,8 +131,6 @@ signType="secp256k1"
...
@@ -131,8 +131,6 @@ signType="secp256k1"
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
...
...
plugin/dapp/paracross/executor/paracross_test.go
View file @
6a3fd8fe
...
@@ -735,11 +735,11 @@ func createCrossCommitTx(s suite.Suite) (*types.Transaction, error) {
...
@@ -735,11 +735,11 @@ func createCrossCommitTx(s suite.Suite) (*types.Transaction, error) {
}
}
func
createTxsGroup
(
s
suite
.
Suite
,
txs
[]
*
types
.
Transaction
)
([]
*
types
.
Transaction
,
error
)
{
func
createTxsGroup
(
s
suite
.
Suite
,
txs
[]
*
types
.
Transaction
)
([]
*
types
.
Transaction
,
error
)
{
group
,
err
:=
types
.
CreateTxGroup
(
txs
,
chain33TestCfg
.
G
Int
(
"MinFee"
))
group
,
err
:=
types
.
CreateTxGroup
(
txs
,
chain33TestCfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
err
=
group
.
Check
(
chain33TestCfg
,
0
,
chain33TestCfg
.
G
Int
(
"MinFee"
),
chain33TestCfg
.
GInt
(
"MaxFee"
))
err
=
group
.
Check
(
chain33TestCfg
,
0
,
chain33TestCfg
.
G
etMinTxFeeRate
(),
chain33TestCfg
.
GetMaxTxFee
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
plugin/dapp/paracross/testnode/cfg.go
View file @
6a3fd8fe
...
@@ -70,7 +70,7 @@ grpcFuncWhitelist=["*"]
...
@@ -70,7 +70,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name="timeline"
name="timeline"
poolCacheSize=10240
poolCacheSize=10240
minTxFee=100000
minTxFee
Rate
=100000
maxTxNumPerAccount=10000
maxTxNumPerAccount=10000
[mempool.sub.para]
[mempool.sub.para]
...
@@ -148,8 +148,6 @@ signType="secp256k1"
...
@@ -148,8 +148,6 @@ signType="secp256k1"
minerdisable=true
minerdisable=true
[exec]
[exec]
isFree=true
minExecFee=100000
enableStat=false
enableStat=false
[exec.sub.relay]
[exec.sub.relay]
...
...
plugin/dapp/paracross/types/paracross.go
View file @
6a3fd8fe
...
@@ -307,7 +307,7 @@ func CreateRawMinerTx(cfg *types.Chain33Config, value *ParacrossMinerAction) (*t
...
@@ -307,7 +307,7 @@ func CreateRawMinerTx(cfg *types.Chain33Config, value *ParacrossMinerAction) (*t
Nonce
:
0
,
//for consensus purpose, block hash need same, different auth node need keep totally same vote tx
Nonce
:
0
,
//for consensus purpose, block hash need same, different auth node need keep totally same vote tx
To
:
address
.
ExecAddress
(
cfg
.
ExecName
(
ParaX
)),
To
:
address
.
ExecAddress
(
cfg
.
ExecName
(
ParaX
)),
}
}
err
:=
tx
.
SetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
err
:=
tx
.
SetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
plugin/dapp/privacy/wallet/privacy.go
View file @
6a3fd8fe
...
@@ -543,7 +543,7 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *privacytypes.ReqCreateP
...
@@ -543,7 +543,7 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *privacytypes.ReqCreateP
ActionType
:
action
.
Ty
,
ActionType
:
action
.
Ty
,
}),
}),
}
}
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
bizlog
.
Error
(
"createPublic2PrivacyTx"
,
"calc fee failed"
,
err
)
bizlog
.
Error
(
"createPublic2PrivacyTx"
,
"calc fee failed"
,
err
)
return
nil
,
err
return
nil
,
err
...
@@ -622,7 +622,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *privacytypes.ReqCreate
...
@@ -622,7 +622,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *privacytypes.ReqCreate
}
}
tx
.
SetExpire
(
cfg
,
time
.
Duration
(
req
.
Expire
))
tx
.
SetExpire
(
cfg
,
time
.
Duration
(
req
.
Expire
))
if
!
isMainetCoins
{
if
!
isMainetCoins
{
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
bizlog
.
Error
(
"createPrivacy2PrivacyTx"
,
"calc fee failed"
,
err
)
bizlog
.
Error
(
"createPrivacy2PrivacyTx"
,
"calc fee failed"
,
err
)
return
nil
,
err
return
nil
,
err
...
@@ -711,7 +711,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *privacytypes.ReqCreateP
...
@@ -711,7 +711,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *privacytypes.ReqCreateP
}
}
tx
.
SetExpire
(
cfg
,
time
.
Duration
(
req
.
Expire
))
tx
.
SetExpire
(
cfg
,
time
.
Duration
(
req
.
Expire
))
if
!
isMainetCoins
{
if
!
isMainetCoins
{
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
Fee
,
err
=
tx
.
GetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
bizlog
.
Error
(
"createPrivacy2PublicTx"
,
"calc fee failed"
,
err
)
bizlog
.
Error
(
"createPrivacy2PublicTx"
,
"calc fee failed"
,
err
)
return
nil
,
err
return
nil
,
err
...
...
plugin/dapp/privacy/wallet/privacy_test.go
View file @
6a3fd8fe
...
@@ -220,7 +220,7 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *ty.ReqCreatePrivacyTx) *typ
...
@@ -220,7 +220,7 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *ty.ReqCreatePrivacyTx) *typ
}
}
cfg
:=
mock
.
walletOp
.
GetAPI
()
.
GetConfig
()
cfg
:=
mock
.
walletOp
.
GetAPI
()
.
GetConfig
()
txSize
:=
types
.
Size
(
tx
)
+
types
.
SignatureSize
txSize
:=
types
.
Size
(
tx
)
+
types
.
SignatureSize
realFee
:=
int64
((
txSize
+
1023
)
>>
types
.
Size1Kshiftlen
)
*
cfg
.
G
Int
(
"MinFee"
)
realFee
:=
int64
((
txSize
+
1023
)
>>
types
.
Size1Kshiftlen
)
*
cfg
.
G
etMinTxFeeRate
(
)
tx
.
Fee
=
realFee
tx
.
Fee
=
realFee
tx
.
SetExpire
(
cfg
,
time
.
Hour
)
tx
.
SetExpire
(
cfg
,
time
.
Hour
)
return
tx
return
tx
...
...
plugin/dapp/relay/cmd/relayd/relayd/relayd.go
View file @
6a3fd8fe
...
@@ -327,7 +327,7 @@ func (r *Relayd) transaction(payload []byte) *types.Transaction {
...
@@ -327,7 +327,7 @@ func (r *Relayd) transaction(payload []byte) *types.Transaction {
minFee
:=
types
.
DefaultMinFee
minFee
:=
types
.
DefaultMinFee
if
r
.
config
.
Chain33Cfg
!=
nil
{
if
r
.
config
.
Chain33Cfg
!=
nil
{
minFee
=
r
.
config
.
Chain33Cfg
.
G
Int
(
"MinFee"
)
minFee
=
r
.
config
.
Chain33Cfg
.
G
etMinTxFeeRate
(
)
}
}
fee
,
_
:=
tx
.
GetRealFee
(
minFee
)
fee
,
_
:=
tx
.
GetRealFee
(
minFee
)
tx
.
Fee
=
fee
tx
.
Fee
=
fee
...
...
plugin/dapp/retrieve/cmd/retrieve.go
View file @
6a3fd8fe
...
@@ -72,7 +72,7 @@ func backupCmd(cmd *cobra.Command, args []string) {
...
@@ -72,7 +72,7 @@ func backupCmd(cmd *cobra.Command, args []string) {
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
delay
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"delay"
)
delay
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"delay"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
@@ -133,7 +133,7 @@ func prepareCmd(cmd *cobra.Command, args []string) {
...
@@ -133,7 +133,7 @@ func prepareCmd(cmd *cobra.Command, args []string) {
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
@@ -168,7 +168,7 @@ func performCmd(cmd *cobra.Command, args []string) {
...
@@ -168,7 +168,7 @@ func performCmd(cmd *cobra.Command, args []string) {
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
@@ -215,7 +215,7 @@ func cancelCmd(cmd *cobra.Command, args []string) {
...
@@ -215,7 +215,7 @@ func cancelCmd(cmd *cobra.Command, args []string) {
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
backup
,
_
:=
cmd
.
Flags
()
.
GetString
(
"backup"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"default"
)
defaultFee
:=
float64
(
cfg
.
G
Int
(
"MinFee"
))
/
float64
(
types
.
Coin
)
defaultFee
:=
float64
(
cfg
.
G
etMinTxFeeRate
(
))
/
float64
(
types
.
Coin
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
fee
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"fee"
)
if
fee
<
defaultFee
{
if
fee
<
defaultFee
{
fee
=
defaultFee
fee
=
defaultFee
...
...
plugin/dapp/ticket/executor/testdata/chain33.cfg.toml
View file @
6a3fd8fe
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
...
@@ -62,7 +62,7 @@ grpcFuncWhitelist=["*"]
[mempool]
[mempool]
name
=
"timeline"
name
=
"timeline"
poolCacheSize
=
10240
poolCacheSize
=
10240
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
10000
maxTxNumPerAccount
=
10000
[consensus]
[consensus]
...
@@ -158,8 +158,6 @@ minerwhitelist=["*"]
...
@@ -158,8 +158,6 @@ minerwhitelist=["*"]
minerWaitTime
=
"1s"
minerWaitTime
=
"1s"
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
alias
=
["token1:token","token2:token","token3:token"]
alias
=
["token1:token","token2:token","token3:token"]
...
...
plugin/dapp/ticket/rpc/rpc_test.go
View file @
6a3fd8fe
...
@@ -208,12 +208,10 @@ Title="test"
...
@@ -208,12 +208,10 @@ Title="test"
[mempool]
[mempool]
poolCacheSize=102400
poolCacheSize=102400
minTxFee=100000
minTxFee
Rate
=100000
maxTxNumPerAccount=100
maxTxNumPerAccount=100
[exec]
[exec]
isFree=false
minExecFee=100000
enableStat=false
enableStat=false
enableMVCC=false
enableMVCC=false
...
...
plugin/dapp/unfreeze/types/types.go
View file @
6a3fd8fe
...
@@ -146,7 +146,7 @@ func CreateUnfreezeCreateTx(cfg *types.Chain33Config, title string, parm *Unfree
...
@@ -146,7 +146,7 @@ func CreateUnfreezeCreateTx(cfg *types.Chain33Config, title string, parm *Unfree
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
}
}
tx
.
SetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
SetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
return
tx
,
nil
return
tx
,
nil
}
}
...
@@ -175,7 +175,7 @@ func CreateUnfreezeWithdrawTx(cfg *types.Chain33Config, title string, parm *Unfr
...
@@ -175,7 +175,7 @@ func CreateUnfreezeWithdrawTx(cfg *types.Chain33Config, title string, parm *Unfr
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
}
}
tx
.
SetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
SetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
return
tx
,
nil
return
tx
,
nil
}
}
...
@@ -204,7 +204,7 @@ func CreateUnfreezeTerminateTx(cfg *types.Chain33Config, title string, parm *Unf
...
@@ -204,7 +204,7 @@ func CreateUnfreezeTerminateTx(cfg *types.Chain33Config, title string, parm *Unf
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
Nonce
:
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
.
Int63
(),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
To
:
address
.
ExecAddress
(
getRealExecName
(
cfg
,
cfg
.
GetParaName
())),
}
}
tx
.
SetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
tx
.
SetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
return
tx
,
nil
return
tx
,
nil
}
}
...
...
plugin/dapp/valnode/commands/valnode.go
View file @
6a3fd8fe
...
@@ -167,7 +167,7 @@ func addNode(cmd *cobra.Command, args []string) {
...
@@ -167,7 +167,7 @@ func addNode(cmd *cobra.Command, args []string) {
value
:=
&
vt
.
ValNodeAction_Node
{
Node
:
&
vt
.
ValNode
{
PubKey
:
pubkeybyte
,
Power
:
power
}}
value
:=
&
vt
.
ValNodeAction_Node
{
Node
:
&
vt
.
ValNode
{
PubKey
:
pubkeybyte
,
Power
:
power
}}
action
:=
&
vt
.
ValNodeAction
{
Value
:
value
,
Ty
:
vt
.
ValNodeActionUpdate
}
action
:=
&
vt
.
ValNodeAction
{
Value
:
value
,
Ty
:
vt
.
ValNodeActionUpdate
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
vt
.
ValNodeX
),
Payload
:
types
.
Encode
(
action
),
Fee
:
0
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
vt
.
ValNodeX
),
Payload
:
types
.
Encode
(
action
),
Fee
:
0
}
err
=
tx
.
SetRealFee
(
cfg
.
G
Int
(
"MinFee"
))
err
=
tx
.
SetRealFee
(
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
return
return
...
...
plugin/mempool/price/cache_test.go
View file @
6a3fd8fe
...
@@ -212,7 +212,7 @@ func TestRealNodeMempool(t *testing.T) {
...
@@ -212,7 +212,7 @@ func TestRealNodeMempool(t *testing.T) {
//发送交易组
//发送交易组
tx1
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx1
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx2
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx2
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
txgroup
,
err
:=
types
.
CreateTxGroup
([]
*
types
.
Transaction
{
tx1
,
tx2
},
cfg
.
G
Int
(
"MinFee"
))
txgroup
,
err
:=
types
.
CreateTxGroup
([]
*
types
.
Transaction
{
tx1
,
tx2
},
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
continue
continue
...
...
plugin/mempool/price/chain33.test.toml
View file @
6a3fd8fe
...
@@ -66,7 +66,7 @@ keyFile="key.pem"
...
@@ -66,7 +66,7 @@ keyFile="key.pem"
[mempool]
[mempool]
name
=
"price"
name
=
"price"
poolCacheSize
=
200
poolCacheSize
=
200
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
100
maxTxNumPerAccount
=
100
[mempool.sub.timeline]
[mempool.sub.timeline]
...
@@ -161,8 +161,6 @@ signType="secp256k1"
...
@@ -161,8 +161,6 @@ signType="secp256k1"
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
...
...
plugin/mempool/price/mempool.go
View file @
6a3fd8fe
...
@@ -27,7 +27,7 @@ func New(cfg *types.Mempool, sub []byte) queue.Module {
...
@@ -27,7 +27,7 @@ func New(cfg *types.Mempool, sub []byte) queue.Module {
subcfg
.
PoolCacheSize
=
cfg
.
PoolCacheSize
subcfg
.
PoolCacheSize
=
cfg
.
PoolCacheSize
}
}
if
subcfg
.
ProperFee
==
0
{
if
subcfg
.
ProperFee
==
0
{
subcfg
.
ProperFee
=
cfg
.
MinTxFee
subcfg
.
ProperFee
=
cfg
.
MinTxFee
Rate
}
}
c
.
SetQueueCache
(
NewQueue
(
subcfg
))
c
.
SetQueueCache
(
NewQueue
(
subcfg
))
return
c
return
c
...
...
plugin/mempool/score/cache_test.go
View file @
6a3fd8fe
...
@@ -188,7 +188,7 @@ func TestRealNodeMempool(t *testing.T) {
...
@@ -188,7 +188,7 @@ func TestRealNodeMempool(t *testing.T) {
//发送交易组
//发送交易组
tx1
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx1
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx2
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
tx2
:=
util
.
CreateCoinsTx
(
cfg
,
priv
,
mock33
.
GetGenesisAddress
(),
types
.
Coin
/
1000
)
txgroup
,
err
:=
types
.
CreateTxGroup
([]
*
types
.
Transaction
{
tx1
,
tx2
},
cfg
.
G
Int
(
"MinFee"
))
txgroup
,
err
:=
types
.
CreateTxGroup
([]
*
types
.
Transaction
{
tx1
,
tx2
},
cfg
.
G
etMinTxFeeRate
(
))
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
continue
continue
...
...
plugin/mempool/score/chain33.test.toml
View file @
6a3fd8fe
...
@@ -66,7 +66,7 @@ keyFile="key.pem"
...
@@ -66,7 +66,7 @@ keyFile="key.pem"
[mempool]
[mempool]
name
=
"score"
name
=
"score"
poolCacheSize
=
200
poolCacheSize
=
200
minTxFee
=
100000
minTxFee
Rate
=
100000
maxTxNumPerAccount
=
100
maxTxNumPerAccount
=
100
[mempool.sub.timeline]
[mempool.sub.timeline]
...
@@ -160,8 +160,6 @@ signType="secp256k1"
...
@@ -160,8 +160,6 @@ signType="secp256k1"
minerwhitelist
=
["*"]
minerwhitelist
=
["*"]
[exec]
[exec]
isFree
=
false
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
enableMVCC
=
false
...
...
plugin/mempool/score/mempool.go
View file @
6a3fd8fe
...
@@ -30,7 +30,7 @@ func New(cfg *types.Mempool, sub []byte) queue.Module {
...
@@ -30,7 +30,7 @@ func New(cfg *types.Mempool, sub []byte) queue.Module {
subcfg
.
PoolCacheSize
=
cfg
.
PoolCacheSize
subcfg
.
PoolCacheSize
=
cfg
.
PoolCacheSize
}
}
if
subcfg
.
ProperFee
==
0
{
if
subcfg
.
ProperFee
==
0
{
subcfg
.
ProperFee
=
cfg
.
MinTxFee
subcfg
.
ProperFee
=
cfg
.
MinTxFee
Rate
}
}
c
.
SetQueueCache
(
NewQueue
(
subcfg
))
c
.
SetQueueCache
(
NewQueue
(
subcfg
))
return
c
return
c
...
...
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