remove id in localhost (#7577)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
This commit is contained in:
colin axnér 2020-10-17 23:05:26 +02:00 committed by GitHub
parent 06c068713d
commit c40f3d02a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 68 deletions

View File

@ -10,10 +10,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localho
// access to keys outside the client prefix.
message ClientState {
option (gogoproto.goproto_getters) = false;
// client id
string id = 1;
// self chain ID
string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""];
string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""];
// self latest block height
ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false];
}

View File

@ -27,12 +27,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// ClientState defines a loopback (localhost) client. It requires (read-only)
// access to keys outside the client prefix.
type ClientState struct {
// client id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// self chain ID
ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"`
ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"`
// self latest block height
Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"`
Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"`
}
func (m *ClientState) Reset() { *m = ClientState{} }
@ -77,26 +75,25 @@ func init() {
}
var fileDescriptor_acd9f5b22d41bf6d = []byte{
// 294 bytes of a gzipped FileDescriptorProto
// 279 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcd, 0x4c, 0x4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 0x62, 0x39,
0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xde, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x53, 0xec, 0x89,
0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3,
0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26,
0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0x43, 0x29, 0xdd, 0xe2, 0x94,
0x6c, 0xfd, 0x0a, 0x7d, 0x78, 0xe0, 0xe9, 0xc2, 0x42, 0xcf, 0xc0, 0x52, 0x17, 0x11, 0x80, 0x25,
0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x4f, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcd,
0x7d, 0x91, 0x77, 0x6b, 0x01, 0x00, 0x00,
}
func (m *ClientState) Marshal() (dAtA []byte, err error) {
@ -128,19 +125,12 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintLocalhost(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
dAtA[i] = 0x12
if len(m.ChainId) > 0 {
i -= len(m.ChainId)
copy(dAtA[i:], m.ChainId)
i = encodeVarintLocalhost(dAtA, i, uint64(len(m.ChainId)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintLocalhost(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
@ -163,10 +153,6 @@ func (m *ClientState) Size() (n int) {
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovLocalhost(uint64(l))
}
l = len(m.ChainId)
if l > 0 {
n += 1 + l + sovLocalhost(uint64(l))
@ -212,38 +198,6 @@ func (m *ClientState) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowLocalhost
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthLocalhost
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthLocalhost
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
}
@ -275,7 +229,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error {
}
m.ChainId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
}