mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 23:14:37 +00:00
prefix proto types (#4007)
Fixes #3986 This pull request is prefixing all the types in proto to avoid conflict. When a go application is using Tendermint as a library and also define similar types in gogo proto some conflicts might occur (as types is a common package in go). By prefixing the types with tendermint, this highly reduces the risk of conflicts. BREAKING CHANGE. This modification breaks the ABCI Application endpoint. What was accessible before with `/types.ABCIApplication/Flush` is now accessible with `/tendermint.abci.types.ABCIApplication/Flush`.
This commit is contained in:
+16
-14
@@ -139,28 +139,30 @@ func (m *KI64Pair) GetValue() int64 {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*KVPair)(nil), "common.KVPair")
|
||||
golang_proto.RegisterType((*KVPair)(nil), "common.KVPair")
|
||||
proto.RegisterType((*KI64Pair)(nil), "common.KI64Pair")
|
||||
golang_proto.RegisterType((*KI64Pair)(nil), "common.KI64Pair")
|
||||
proto.RegisterType((*KVPair)(nil), "tendermint.libs.common.KVPair")
|
||||
golang_proto.RegisterType((*KVPair)(nil), "tendermint.libs.common.KVPair")
|
||||
proto.RegisterType((*KI64Pair)(nil), "tendermint.libs.common.KI64Pair")
|
||||
golang_proto.RegisterType((*KI64Pair)(nil), "tendermint.libs.common.KI64Pair")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("libs/common/types.proto", fileDescriptor_28b36ea5054b507d) }
|
||||
func init() { golang_proto.RegisterFile("libs/common/types.proto", fileDescriptor_28b36ea5054b507d) }
|
||||
|
||||
var fileDescriptor_28b36ea5054b507d = []byte{
|
||||
// 174 bytes of a gzipped FileDescriptorProto
|
||||
// 197 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0xc9, 0x4c, 0x2a,
|
||||
0xd6, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28,
|
||||
0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0x88, 0x49, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9,
|
||||
0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0xa5, 0x93, 0x4a, 0xd3, 0xc0, 0x3c,
|
||||
0x30, 0x07, 0xcc, 0x82, 0x68, 0x53, 0x32, 0xe0, 0x62, 0xf3, 0x0e, 0x0b, 0x48, 0xcc, 0x2c, 0x12,
|
||||
0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x02, 0x31, 0x85,
|
||||
0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10, 0x8e, 0x92, 0x11,
|
||||
0x17, 0x87, 0xb7, 0xa7, 0x99, 0x09, 0x31, 0x7a, 0x98, 0xa1, 0x7a, 0x9c, 0x64, 0x7e, 0x3c, 0x94,
|
||||
0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c,
|
||||
0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc0, 0x63, 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x53, 0x8c,
|
||||
0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x39, 0xe1, 0xef, 0xdc, 0x00, 0x00, 0x00,
|
||||
0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2b, 0x49, 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1,
|
||||
0x03, 0xa9, 0xd1, 0x83, 0xa8, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0x02, 0x71, 0xf5,
|
||||
0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xca, 0x93, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82,
|
||||
0x18, 0xa3, 0x64, 0xc0, 0xc5, 0xe6, 0x1d, 0x16, 0x90, 0x98, 0x59, 0x24, 0x24, 0xc0, 0xc5, 0x9c,
|
||||
0x9d, 0x5a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0x62, 0x0a, 0x89, 0x70, 0xb1, 0x96,
|
||||
0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x25, 0x23, 0x2e, 0x0e, 0x6f, 0x4f,
|
||||
0x33, 0x13, 0x62, 0xf4, 0x30, 0x43, 0xf5, 0x38, 0x79, 0xfd, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91,
|
||||
0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0,
|
||||
0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, 0x8c, 0x51, 0x3a, 0x48, 0x4e, 0x46, 0xf8, 0x0a, 0x99, 0x89,
|
||||
0x14, 0x08, 0x49, 0x6c, 0x60, 0x87, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xc3, 0x96,
|
||||
0x94, 0x1a, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *KVPair) Equal(that interface{}) bool {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package common;
|
||||
package tendermint.libs.common;
|
||||
option go_package = "github.com/tendermint/tendermint/libs/common";
|
||||
|
||||
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user