Commit e664d86c authored by harrylee's avatar harrylee

fix a bug for register conflict

parent d5a89cc8
Pipeline #8208 failed with stages
in 0 seconds
...@@ -65,7 +65,7 @@ func (b *BrokerDB) initBroker(payload *brokertypes.Init) (*types.Receipt, error) ...@@ -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.RegisterExector) (*types.Receipt, error) {
return nil, nil return nil, nil
} }
......
...@@ -15,7 +15,7 @@ func (b *broker) Exec_Init(payload *brokertypes.Init,tx *types.Transaction, inde ...@@ -15,7 +15,7 @@ func (b *broker) Exec_Init(payload *brokertypes.Init,tx *types.Transaction, inde
return db.initBroker(payload) return db.initBroker(payload)
} }
func (b *broker) Exec_Register(payload *brokertypes.Register, tx *types.Transaction, index int) (*types.Receipt, error) { func (b *broker) Exec_RegisterExector(payload *brokertypes.RegisterExector, tx *types.Transaction, index int) (*types.Receipt, error) {
db := newBrokerDB(b,tx,index) db := newBrokerDB(b,tx,index)
return db.register(payload) return db.register(payload)
} }
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
* 非关键数据,本地存储(localDB), 用于辅助查询,效率高 * 非关键数据,本地存储(localDB), 用于辅助查询,效率高
*/ */
func (b *broker) ExecLocal_Register(payload *brokertypes.Register, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) { func (b *broker) ExecLocal_RegisterExector(payload *brokertypes.RegisterExector, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
dbSet := &types.LocalDBSet{} dbSet := &types.LocalDBSet{}
//implement code, add customize kv to dbSet... //implement code, add customize kv to dbSet...
......
...@@ -4,7 +4,7 @@ option go_package = "../types"; ...@@ -4,7 +4,7 @@ option go_package = "../types";
message BrokerAction { message BrokerAction {
oneof value { oneof value {
Init init =1; Init init =1;
Register register = 2; RegisterExector registerExector = 2;
Audit audit = 3; Audit audit = 3;
InterchainEvent emitInterchainEvent = 4; InterchainEvent emitInterchainEvent = 4;
UpdateIndex updateIndex =5; UpdateIndex updateIndex =5;
...@@ -21,7 +21,7 @@ message Init { ...@@ -21,7 +21,7 @@ message Init {
// 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败 // 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败
message Register { message RegisterExector {
//业务合约名称 //业务合约名称
string exectorName = 1; string exectorName = 1;
} }
...@@ -73,7 +73,7 @@ message InterchainEvent { ...@@ -73,7 +73,7 @@ message InterchainEvent {
//ReceiptBrokerLog //ReceiptBrokerLog
message ReceiptBrokerLog{ message ReceiptBrokerLog{
oneof value { oneof value {
Register register = 1; RegisterExector registerExector = 1;
Audit audit = 2; Audit audit = 2;
InterchainEvent emitInterchainEvent = 3; InterchainEvent emitInterchainEvent = 3;
UpdateIndex updateIndex =4; UpdateIndex updateIndex =4;
......
...@@ -15,13 +15,13 @@ import ( ...@@ -15,13 +15,13 @@ import (
const ( const (
TyUnknowAction = iota + 100 TyUnknowAction = iota + 100
TyInitAction TyInitAction
TyRegisterAction TyRegisterExectorAction
TyAuditAction TyAuditAction
TyUpdateIndexAction TyUpdateIndexAction
TyEmitInterchainEventAction TyEmitInterchainEventAction
NameInitAction = "Init" NameInitAction = "Init"
NameRegisterAction = "Register" NameRegisterExectorAction = "RegisterExector"
NameAuditAction = "Audit" NameAuditAction = "Audit"
NameUpdateIndexAction = "UpdateIndex" NameUpdateIndexAction = "UpdateIndex"
NameEmitInterchainEventAction = "EmitInterchainEvent" NameEmitInterchainEventAction = "EmitInterchainEvent"
...@@ -72,7 +72,7 @@ const ( ...@@ -72,7 +72,7 @@ const (
const ( const (
TyUnknownLog = iota + 100 TyUnknownLog = iota + 100
TyInitLog TyInitLog
TyRegisterLog TyRegisterExectorLog
TyAuditLog TyAuditLog
TyUpdateIndexLog TyUpdateIndexLog
TyEmitInterchainEventLog TyEmitInterchainEventLog
...@@ -84,7 +84,7 @@ var ( ...@@ -84,7 +84,7 @@ var (
//定义actionMap //定义actionMap
actionMap = map[string]int32{ actionMap = map[string]int32{
NameInitAction: TyInitAction, NameInitAction: TyInitAction,
NameRegisterAction: TyRegisterAction, NameRegisterExectorAction: TyRegisterExectorAction,
NameAuditAction: TyAuditAction, NameAuditAction: TyAuditAction,
NameUpdateIndexAction: TyUpdateIndexAction, NameUpdateIndexAction: TyUpdateIndexAction,
NameEmitInterchainEventAction: TyEmitInterchainEventAction, NameEmitInterchainEventAction: TyEmitInterchainEventAction,
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment