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)
}
//其他执行器注册授权
func (b *BrokerDB) register(payload *brokertypes.Register) (*types.Receipt, error) {
func (b *BrokerDB) register(payload *brokertypes.RegisterExector) (*types.Receipt, error) {
return nil, nil
}
......
......@@ -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.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)
return db.register(payload)
}
......
......@@ -10,7 +10,7 @@ import (
* 非关键数据,本地存储(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{}
//implement code, add customize kv to dbSet...
......
......@@ -4,7 +4,7 @@ option go_package = "../types";
message BrokerAction {
oneof value {
Init init =1;
Register register = 2;
RegisterExector registerExector = 2;
Audit audit = 3;
InterchainEvent emitInterchainEvent = 4;
UpdateIndex updateIndex =5;
......@@ -21,7 +21,7 @@ message Init {
// 业务合约注册模型: 0表示正在审核,1表示审核通过,2表示审核失败
message Register {
message RegisterExector {
//业务合约名称
string exectorName = 1;
}
......@@ -73,7 +73,7 @@ message InterchainEvent {
//ReceiptBrokerLog
message ReceiptBrokerLog{
oneof value {
Register register = 1;
RegisterExector registerExector = 1;
Audit audit = 2;
InterchainEvent emitInterchainEvent = 3;
UpdateIndex updateIndex =4;
......
......@@ -15,13 +15,13 @@ import (
const (
TyUnknowAction = iota + 100
TyInitAction
TyRegisterAction
TyRegisterExectorAction
TyAuditAction
TyUpdateIndexAction
TyEmitInterchainEventAction
NameInitAction = "Init"
NameRegisterAction = "Register"
NameRegisterExectorAction = "RegisterExector"
NameAuditAction = "Audit"
NameUpdateIndexAction = "UpdateIndex"
NameEmitInterchainEventAction = "EmitInterchainEvent"
......@@ -72,7 +72,7 @@ const (
const (
TyUnknownLog = iota + 100
TyInitLog
TyRegisterLog
TyRegisterExectorLog
TyAuditLog
TyUpdateIndexLog
TyEmitInterchainEventLog
......@@ -84,7 +84,7 @@ var (
//定义actionMap
actionMap = map[string]int32{
NameInitAction: TyInitAction,
NameRegisterAction: TyRegisterAction,
NameRegisterExectorAction: TyRegisterExectorAction,
NameAuditAction: TyAuditAction,
NameUpdateIndexAction: TyUpdateIndexAction,
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