Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto message 与fabric重名,无法与fabric在同一个项目中编译 #44

Open
shinyxhh opened this issue Dec 6, 2021 · 1 comment

Comments

@shinyxhh
Copy link

shinyxhh commented Dec 6, 2021

github.com/xuperchain/[email protected]/protos/event.pb.go 代码:
func init() {
proto.RegisterEnum("protos.SubscribeType", SubscribeType_name, SubscribeType_value)
proto.RegisterType((*SubscribeRequest)(nil), "protos.SubscribeRequest")
proto.RegisterType((*Event)(nil), "protos.Event")
proto.RegisterType((*BlockRange)(nil), "protos.BlockRange")
proto.RegisterType((*BlockFilter)(nil), "protos.BlockFilter")
proto.RegisterType((*FilteredBlock)(nil), "protos.FilteredBlock")
proto.RegisterType((*FilteredTransaction)(nil), "protos.FilteredTransaction")
}

github.com/hyperledger/fabric-protos-go/blob/release-2.2/peer/events.pb.go 代码:
func init() {
proto.RegisterType((*FilteredBlock)(nil), "protos.FilteredBlock")
proto.RegisterType((*FilteredTransaction)(nil), "protos.FilteredTransaction")
proto.RegisterType((*FilteredTransactionActions)(nil), "protos.FilteredTransactionActions")
proto.RegisterType((*FilteredChaincodeAction)(nil), "protos.FilteredChaincodeAction")
proto.RegisterType((*BlockAndPrivateData)(nil), "protos.BlockAndPrivateData")
proto.RegisterMapType((map[uint64]*rwset.TxPvtReadWriteSet)(nil), "protos.BlockAndPrivateData.PrivateDataMapEntry")
proto.RegisterType((*DeliverResponse)(nil), "protos.DeliverResponse")
}

其中protos.FilteredBlock,protos.FilteredTransaction重复,导致编译后运行直接panic

@shinyxhh shinyxhh changed the title proto message 与fabric重名,无法与fabric再同一个项目中编译 proto message 与fabric重名,无法与fabric在同一个项目中编译 Dec 6, 2021
@superlitian
Copy link
Contributor

proto message 不支持调整。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants