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
e664d86c
Commit
e664d86c
authored
Nov 04, 2021
by
harrylee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a bug for register conflict
parent
d5a89cc8
Pipeline
#8208
failed with stages
in 0 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
416 additions
and
10 deletions
+416
-10
brokerdb.go
plugin/dapp/broker/executor/brokerdb.go
+1
-1
exec.go
plugin/dapp/broker/executor/exec.go
+1
-1
exec_local.go
plugin/dapp/broker/executor/exec_local.go
+1
-1
broker.proto
plugin/dapp/broker/proto/broker.proto
+3
-3
broker.go
plugin/dapp/broker/types/broker.go
+4
-4
broker.pb.go
plugin/dapp/broker/types/broker.pb.go
+0
-0
chain33.para.toml
plugin/dapp/cross2eth/cmd/build/chain33.para.toml
+406
-0
No files found.
plugin/dapp/broker/executor/brokerdb.go
View file @
e664d86c
...
...
@@ -65,7 +65,7 @@ func (b *BrokerDB) initBroker(payload *brokertypes.Init) (*types.Receipt, error)
}
//其他执行器注册授权
func
(
b
*
BrokerDB
)
register
(
payload
*
brokertypes
.
Register
)
(
*
types
.
Receipt
,
error
)
{
func
(
b
*
BrokerDB
)
register
(
payload
*
brokertypes
.
Register
Exector
)
(
*
types
.
Receipt
,
error
)
{
return
nil
,
nil
}
...
...
plugin/dapp/broker/executor/exec.go
View file @
e664d86c
...
...
@@ -15,7 +15,7 @@ func (b *broker) Exec_Init(payload *brokertypes.Init,tx *types.Transaction, inde
return
db
.
initBroker
(
payload
)
}
func
(
b
*
broker
)
Exec_Register
(
payload
*
brokertypes
.
Registe
r
,
tx
*
types
.
Transaction
,
index
int
)
(
*
types
.
Receipt
,
error
)
{
func
(
b
*
broker
)
Exec_Register
Exector
(
payload
*
brokertypes
.
RegisterExecto
r
,
tx
*
types
.
Transaction
,
index
int
)
(
*
types
.
Receipt
,
error
)
{
db
:=
newBrokerDB
(
b
,
tx
,
index
)
return
db
.
register
(
payload
)
}
...
...
plugin/dapp/broker/executor/exec_local.go
View file @
e664d86c
...
...
@@ -10,7 +10,7 @@ import (
* 非关键数据,本地存储(localDB), 用于辅助查询,效率高
*/
func
(
b
*
broker
)
ExecLocal_Register
(
payload
*
brokertypes
.
Registe
r
,
tx
*
types
.
Transaction
,
receiptData
*
types
.
ReceiptData
,
index
int
)
(
*
types
.
LocalDBSet
,
error
)
{
func
(
b
*
broker
)
ExecLocal_Register
Exector
(
payload
*
brokertypes
.
RegisterExecto
r
,
tx
*
types
.
Transaction
,
receiptData
*
types
.
ReceiptData
,
index
int
)
(
*
types
.
LocalDBSet
,
error
)
{
dbSet
:=
&
types
.
LocalDBSet
{}
//implement code, add customize kv to dbSet...
...
...
plugin/dapp/broker/proto/broker.proto
View file @
e664d86c
...
...
@@ -4,7 +4,7 @@ option go_package = "../types";
message
BrokerAction
{
oneof
value
{
Init
init
=
1
;
Register
registe
r
=
2
;
Register
Exector
registerExecto
r
=
2
;
Audit
audit
=
3
;
InterchainEvent
emitInterchainEvent
=
4
;
UpdateIndex
updateIndex
=
5
;
...
...
@@ -21,7 +21,7 @@ message Init {
// 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败
message
Register
{
message
Register
Exector
{
//业务合约名称
string
exectorName
=
1
;
}
...
...
@@ -73,7 +73,7 @@ message InterchainEvent {
//ReceiptBrokerLog
message
ReceiptBrokerLog
{
oneof
value
{
Register
registe
r
=
1
;
Register
Exector
registerExecto
r
=
1
;
Audit
audit
=
2
;
InterchainEvent
emitInterchainEvent
=
3
;
UpdateIndex
updateIndex
=
4
;
...
...
plugin/dapp/broker/types/broker.go
View file @
e664d86c
...
...
@@ -15,13 +15,13 @@ import (
const
(
TyUnknowAction
=
iota
+
100
TyInitAction
TyRegisterAction
TyRegister
Exector
Action
TyAuditAction
TyUpdateIndexAction
TyEmitInterchainEventAction
NameInitAction
=
"Init"
NameRegister
Action
=
"Registe
r"
NameRegister
ExectorAction
=
"RegisterExecto
r"
NameAuditAction
=
"Audit"
NameUpdateIndexAction
=
"UpdateIndex"
NameEmitInterchainEventAction
=
"EmitInterchainEvent"
...
...
@@ -72,7 +72,7 @@ const (
const
(
TyUnknownLog
=
iota
+
100
TyInitLog
TyRegisterLog
TyRegister
Exector
Log
TyAuditLog
TyUpdateIndexLog
TyEmitInterchainEventLog
...
...
@@ -84,7 +84,7 @@ var (
//定义actionMap
actionMap
=
map
[
string
]
int32
{
NameInitAction
:
TyInitAction
,
NameRegister
Action
:
TyRegiste
rAction
,
NameRegister
ExectorAction
:
TyRegisterExecto
rAction
,
NameAuditAction
:
TyAuditAction
,
NameUpdateIndexAction
:
TyUpdateIndexAction
,
NameEmitInterchainEventAction
:
TyEmitInterchainEventAction
,
...
...
plugin/dapp/broker/types/broker.pb.go
View file @
e664d86c
This diff is collapsed.
Click to expand it.
plugin/dapp/cross2eth/cmd/build/chain33.para.toml
0 → 100644
View file @
e664d86c
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