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
e9985ab0
Commit
e9985ab0
authored
Aug 05, 2019
by
vipwzw
Committed by
33cn
Aug 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
9b962259
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
161 additions
and
66 deletions
+161
-66
board.go
plugin/dapp/autonomy/executor/board.go
+3
-3
board_test.go
plugin/dapp/autonomy/executor/board_test.go
+4
-7
boardtable.go
plugin/dapp/autonomy/executor/boardtable.go
+1
-1
project.go
plugin/dapp/autonomy/executor/project.go
+3
-3
project_test.go
plugin/dapp/autonomy/executor/project_test.go
+4
-5
projecttable.go
plugin/dapp/autonomy/executor/projecttable.go
+1
-1
rule.go
plugin/dapp/autonomy/executor/rule.go
+3
-4
rule_test.go
plugin/dapp/autonomy/executor/rule_test.go
+4
-5
ruletable.go
plugin/dapp/autonomy/executor/ruletable.go
+1
-1
autonomy.pb.go
plugin/dapp/autonomy/types/autonomy.pb.go
+0
-0
board.pb.go
plugin/dapp/autonomy/types/board.pb.go
+0
-0
lcommon.pb.go
plugin/dapp/autonomy/types/lcommon.pb.go
+137
-36
project.pb.go
plugin/dapp/autonomy/types/project.pb.go
+0
-0
rule.pb.go
plugin/dapp/autonomy/types/rule.pb.go
+0
-0
No files found.
plugin/dapp/autonomy/executor/board.go
View file @
e9985ab0
...
@@ -126,9 +126,9 @@ func (a *Autonomy) listProposalBoard(req *auty.ReqQueryProposalBoard) (types.Mes
...
@@ -126,9 +126,9 @@ func (a *Autonomy) listProposalBoard(req *auty.ReqQueryProposalBoard) (types.Mes
AutonomyProposalBoard
:
&
auty
.
AutonomyProposalBoard
{},
AutonomyProposalBoard
:
&
auty
.
AutonomyProposalBoard
{},
}
}
cur
.
Address
=
req
.
Addr
cur
.
Address
=
req
.
Addr
cur
.
Status
=
req
.
Status
cur
.
Status
=
req
.
Status
cur
.
Height
=
req
.
Height
cur
.
Height
=
req
.
Height
cur
.
Index
=
req
.
Index
cur
.
Index
=
req
.
Index
prefix
,
err
:=
cur
.
Get
(
indexName
)
prefix
,
err
:=
cur
.
Get
(
indexName
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
...
...
plugin/dapp/autonomy/executor/board_test.go
View file @
e9985ab0
...
@@ -7,13 +7,13 @@ package executor
...
@@ -7,13 +7,13 @@ package executor
import
(
import
(
"testing"
"testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/util"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"github.com/
33cn/chain33/common/db
"
"github.com/
stretchr/testify/require
"
)
)
func
TestExecLocalBoard
(
t
*
testing
.
T
)
{
func
TestExecLocalBoard
(
t
*
testing
.
T
)
{
...
@@ -48,7 +48,6 @@ func TestExecLocalBoard(t *testing.T) {
...
@@ -48,7 +48,6 @@ func TestExecLocalBoard(t *testing.T) {
// check
// check
checkExecLocalBoard
(
t
,
kvdb
,
cur
)
checkExecLocalBoard
(
t
,
kvdb
,
cur
)
// TyLogRvkPropBoard
// TyLogRvkPropBoard
pre1
:=
copyAutonomyProposalBoard
(
cur
)
pre1
:=
copyAutonomyProposalBoard
(
cur
)
cur
.
Status
=
auty
.
AutonomyStatusRvkPropBoard
cur
.
Status
=
auty
.
AutonomyStatusRvkPropBoard
...
@@ -142,7 +141,6 @@ func TestExecDelLocalBoard(t *testing.T) {
...
@@ -142,7 +141,6 @@ func TestExecDelLocalBoard(t *testing.T) {
_
,
err
=
query
.
ListIndex
(
"addr_status"
,
nil
,
nil
,
10
,
0
)
_
,
err
=
query
.
ListIndex
(
"addr_status"
,
nil
,
nil
,
10
,
0
)
assert
.
Equal
(
t
,
err
,
types
.
ErrNotFound
)
assert
.
Equal
(
t
,
err
,
types
.
ErrNotFound
)
// TyLogVotePropBoard
// TyLogVotePropBoard
pre1
:=
copyAutonomyProposalBoard
(
cur
)
pre1
:=
copyAutonomyProposalBoard
(
cur
)
cur
.
Status
=
auty
.
AutonomyStatusVotePropBoard
cur
.
Status
=
auty
.
AutonomyStatusVotePropBoard
...
@@ -294,7 +292,7 @@ func TestListProposalBoard(t *testing.T) {
...
@@ -294,7 +292,7 @@ func TestListProposalBoard(t *testing.T) {
Status
:
auty
.
AutonomyStatusProposalBoard
,
Status
:
auty
.
AutonomyStatusProposalBoard
,
Count
:
10
,
Count
:
10
,
Direction
:
0
,
Direction
:
0
,
Height
:
height
,
Height
:
height
,
Index
:
index
,
Index
:
index
,
}
}
rsp
,
err
=
au
.
listProposalBoard
(
req
)
rsp
,
err
=
au
.
listProposalBoard
(
req
)
...
@@ -340,4 +338,4 @@ func saveKvs(sdb db.DB, kvs []*types.KeyValue) {
...
@@ -340,4 +338,4 @@ func saveKvs(sdb db.DB, kvs []*types.KeyValue) {
sdb
.
Set
(
kv
.
Key
,
kv
.
Value
)
sdb
.
Set
(
kv
.
Key
,
kv
.
Value
)
}
}
}
}
}
}
\ No newline at end of file
plugin/dapp/autonomy/executor/boardtable.go
View file @
e9985ab0
...
@@ -6,9 +6,9 @@ import (
...
@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
)
)
/*
/*
...
...
plugin/dapp/autonomy/executor/project.go
View file @
e9985ab0
...
@@ -124,9 +124,9 @@ func (a *Autonomy) listProposalProject(req *auty.ReqQueryProposalProject) (types
...
@@ -124,9 +124,9 @@ func (a *Autonomy) listProposalProject(req *auty.ReqQueryProposalProject) (types
AutonomyProposalProject
:
&
auty
.
AutonomyProposalProject
{},
AutonomyProposalProject
:
&
auty
.
AutonomyProposalProject
{},
}
}
cur
.
Address
=
req
.
Addr
cur
.
Address
=
req
.
Addr
cur
.
Status
=
req
.
Status
cur
.
Status
=
req
.
Status
cur
.
Height
=
req
.
Height
cur
.
Height
=
req
.
Height
cur
.
Index
=
req
.
Index
cur
.
Index
=
req
.
Index
prefix
,
err
:=
cur
.
Get
(
indexName
)
prefix
,
err
:=
cur
.
Get
(
indexName
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
...
...
plugin/dapp/autonomy/executor/project_test.go
View file @
e9985ab0
...
@@ -7,13 +7,13 @@ package executor
...
@@ -7,13 +7,13 @@ package executor
import
(
import
(
"testing"
"testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/util"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/33cn/chain33/common/db"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
)
func
TestExecLocalProject
(
t
*
testing
.
T
)
{
func
TestExecLocalProject
(
t
*
testing
.
T
)
{
...
@@ -298,7 +298,7 @@ func TestListProposalProject(t *testing.T) {
...
@@ -298,7 +298,7 @@ func TestListProposalProject(t *testing.T) {
Status
:
auty
.
AutonomyStatusProposalProject
,
Status
:
auty
.
AutonomyStatusProposalProject
,
Count
:
10
,
Count
:
10
,
Direction
:
0
,
Direction
:
0
,
Height
:
height
,
Height
:
height
,
Index
:
index
,
Index
:
index
,
}
}
rsp
,
err
=
au
.
listProposalProject
(
req
)
rsp
,
err
=
au
.
listProposalProject
(
req
)
...
@@ -334,4 +334,4 @@ func checkExecLocalProject(t *testing.T, kvdb db.KVDB, cur *auty.AutonomyProposa
...
@@ -334,4 +334,4 @@ func checkExecLocalProject(t *testing.T, kvdb db.KVDB, cur *auty.AutonomyProposa
assert
.
Equal
(
t
,
true
,
ok
)
assert
.
Equal
(
t
,
true
,
ok
)
assert
.
Equal
(
t
,
prop
,
cur
)
assert
.
Equal
(
t
,
prop
,
cur
)
}
}
\ No newline at end of file
plugin/dapp/autonomy/executor/projecttable.go
View file @
e9985ab0
...
@@ -6,9 +6,9 @@ import (
...
@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
)
)
/*
/*
...
...
plugin/dapp/autonomy/executor/rule.go
View file @
e9985ab0
...
@@ -81,7 +81,6 @@ func (a *Autonomy) execDelLocalRule(receiptData *types.ReceiptData) (*types.Loca
...
@@ -81,7 +81,6 @@ func (a *Autonomy) execDelLocalRule(receiptData *types.ReceiptData) (*types.Loca
return
dbSet
,
nil
return
dbSet
,
nil
}
}
func
(
a
*
Autonomy
)
getProposalRule
(
req
*
types
.
ReqString
)
(
types
.
Message
,
error
)
{
func
(
a
*
Autonomy
)
getProposalRule
(
req
*
types
.
ReqString
)
(
types
.
Message
,
error
)
{
if
req
==
nil
{
if
req
==
nil
{
return
nil
,
types
.
ErrInvalidParam
return
nil
,
types
.
ErrInvalidParam
...
@@ -124,9 +123,9 @@ func (a *Autonomy) listProposalRule(req *auty.ReqQueryProposalRule) (types.Messa
...
@@ -124,9 +123,9 @@ func (a *Autonomy) listProposalRule(req *auty.ReqQueryProposalRule) (types.Messa
AutonomyProposalRule
:
&
auty
.
AutonomyProposalRule
{},
AutonomyProposalRule
:
&
auty
.
AutonomyProposalRule
{},
}
}
cur
.
Address
=
req
.
Addr
cur
.
Address
=
req
.
Addr
cur
.
Status
=
req
.
Status
cur
.
Status
=
req
.
Status
cur
.
Height
=
req
.
Height
cur
.
Height
=
req
.
Height
cur
.
Index
=
req
.
Index
cur
.
Index
=
req
.
Index
prefix
,
err
:=
cur
.
Get
(
indexName
)
prefix
,
err
:=
cur
.
Get
(
indexName
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
rows
,
err
:=
query
.
ListIndex
(
indexName
,
prefix
,
primary
,
req
.
Count
,
req
.
Direction
)
...
...
plugin/dapp/autonomy/executor/rule_test.go
View file @
e9985ab0
...
@@ -7,13 +7,13 @@ package executor
...
@@ -7,13 +7,13 @@ package executor
import
(
import
(
"testing"
"testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/util"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"github.com/
33cn/chain33/common/db
"
"github.com/
stretchr/testify/require
"
)
)
func
TestExecLocalRule
(
t
*
testing
.
T
)
{
func
TestExecLocalRule
(
t
*
testing
.
T
)
{
...
@@ -313,7 +313,7 @@ func TestListProposalRule(t *testing.T) {
...
@@ -313,7 +313,7 @@ func TestListProposalRule(t *testing.T) {
Status
:
auty
.
AutonomyStatusProposalRule
,
Status
:
auty
.
AutonomyStatusProposalRule
,
Count
:
10
,
Count
:
10
,
Direction
:
0
,
Direction
:
0
,
Height
:
height
,
Height
:
height
,
Index
:
index
,
Index
:
index
,
}
}
rsp
,
err
=
au
.
listProposalRule
(
req
)
rsp
,
err
=
au
.
listProposalRule
(
req
)
...
@@ -483,4 +483,4 @@ func TestListProposalComment(t *testing.T) {
...
@@ -483,4 +483,4 @@ func TestListProposalComment(t *testing.T) {
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
0
]
.
Index
,
int32
(
testcase2
[
1
]
.
index
))
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
0
]
.
Index
,
int32
(
testcase2
[
1
]
.
index
))
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
1
]
.
Height
,
testcase2
[
0
]
.
height
)
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
1
]
.
Height
,
testcase2
[
0
]
.
height
)
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
1
]
.
Index
,
int32
(
testcase2
[
0
]
.
index
))
require
.
Equal
(
t
,
rsp
.
(
*
auty
.
ReplyQueryProposalComment
)
.
RltCmt
[
1
]
.
Index
,
int32
(
testcase2
[
0
]
.
index
))
}
}
\ No newline at end of file
plugin/dapp/autonomy/executor/ruletable.go
View file @
e9985ab0
...
@@ -6,9 +6,9 @@ import (
...
@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
auty
"github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
)
)
/*
/*
...
...
plugin/dapp/autonomy/types/autonomy.pb.go
View file @
e9985ab0
This diff is collapsed.
Click to expand it.
plugin/dapp/autonomy/types/board.pb.go
View file @
e9985ab0
This diff is collapsed.
Click to expand it.
plugin/dapp/autonomy/types/lcommon.pb.go
View file @
e9985ab0
This diff is collapsed.
Click to expand it.
plugin/dapp/autonomy/types/project.pb.go
View file @
e9985ab0
This diff is collapsed.
Click to expand it.
plugin/dapp/autonomy/types/rule.pb.go
View file @
e9985ab0
This diff is collapsed.
Click to expand it.
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