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
6204cb8f
Commit
6204cb8f
authored
Sep 02, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
49c58b39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ruleaction.go
plugin/dapp/autonomy/executor/ruleaction.go
+3
-3
No files found.
plugin/dapp/autonomy/executor/ruleaction.go
View file @
6204cb8f
...
...
@@ -25,6 +25,7 @@ const (
// 最大全体持票人否决率
maxPubOpposeRatio
=
50
// 可以调整,但是可能需要进行范围的限制:参与率最低设置为 50%, 最高设置为 80%,赞成率,最低 50.1%,最高80% ??? 最低 50.1% ????
//不能设置太低和太高,太低就容易作弊,太高则有可能很难达到
// 最小全体持票人参与率
minPubAttendRatio
=
50
...
...
@@ -51,7 +52,7 @@ const (
)
func
checkParaInvalid
(
param
,
min
,
max
int64
)
bool
{
if
param
>
0
&&
((
param
>
max
)
||
param
<
min
)
{
if
param
>
max
||
param
<
min
{
return
true
}
return
false
...
...
@@ -60,8 +61,7 @@ func checkParaInvalid(param, min, max int64) bool {
func
(
a
*
action
)
propRule
(
prob
*
auty
.
ProposalRule
)
(
*
types
.
Receipt
,
error
)
{
cfg
:=
a
.
api
.
GetConfig
()
//如果全小于等于0,则说明该提案规则参数不正确
if
prob
.
RuleCfg
==
nil
||
prob
.
RuleCfg
.
BoardApproveRatio
<=
0
&&
prob
.
RuleCfg
.
PubOpposeRatio
<=
0
&&
prob
.
RuleCfg
.
ProposalAmount
<=
0
&&
prob
.
RuleCfg
.
LargeProjectAmount
<=
0
&&
prob
.
RuleCfg
.
PublicPeriod
<=
0
{
if
prob
.
RuleCfg
==
nil
{
alog
.
Error
(
"propRule "
,
"ProposalRule RuleCfg invaild or have no modify param"
,
prob
.
RuleCfg
)
return
nil
,
types
.
ErrInvalidParam
}
...
...
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