|
|
@ -6,6 +6,7 @@ package statesync |
|
|
|
import ( |
|
|
|
fmt "fmt" |
|
|
|
proto "github.com/gogo/protobuf/proto" |
|
|
|
types "github.com/tendermint/tendermint/proto/tendermint/types" |
|
|
|
io "io" |
|
|
|
math "math" |
|
|
|
math_bits "math/bits" |
|
|
@ -28,6 +29,8 @@ type Message struct { |
|
|
|
// *Message_SnapshotsResponse
|
|
|
|
// *Message_ChunkRequest
|
|
|
|
// *Message_ChunkResponse
|
|
|
|
// *Message_LightBlockRequest
|
|
|
|
// *Message_LightBlockResponse
|
|
|
|
Sum isMessage_Sum `protobuf_oneof:"sum"` |
|
|
|
} |
|
|
|
|
|
|
@ -82,11 +85,19 @@ type Message_ChunkRequest struct { |
|
|
|
type Message_ChunkResponse struct { |
|
|
|
ChunkResponse *ChunkResponse `protobuf:"bytes,4,opt,name=chunk_response,json=chunkResponse,proto3,oneof" json:"chunk_response,omitempty"` |
|
|
|
} |
|
|
|
type Message_LightBlockRequest struct { |
|
|
|
LightBlockRequest *LightBlockRequest `protobuf:"bytes,5,opt,name=light_block_request,json=lightBlockRequest,proto3,oneof" json:"light_block_request,omitempty"` |
|
|
|
} |
|
|
|
type Message_LightBlockResponse struct { |
|
|
|
LightBlockResponse *LightBlockResponse `protobuf:"bytes,6,opt,name=light_block_response,json=lightBlockResponse,proto3,oneof" json:"light_block_response,omitempty"` |
|
|
|
} |
|
|
|
|
|
|
|
func (*Message_SnapshotsRequest) isMessage_Sum() {} |
|
|
|
func (*Message_SnapshotsResponse) isMessage_Sum() {} |
|
|
|
func (*Message_ChunkRequest) isMessage_Sum() {} |
|
|
|
func (*Message_ChunkResponse) isMessage_Sum() {} |
|
|
|
func (*Message_SnapshotsRequest) isMessage_Sum() {} |
|
|
|
func (*Message_SnapshotsResponse) isMessage_Sum() {} |
|
|
|
func (*Message_ChunkRequest) isMessage_Sum() {} |
|
|
|
func (*Message_ChunkResponse) isMessage_Sum() {} |
|
|
|
func (*Message_LightBlockRequest) isMessage_Sum() {} |
|
|
|
func (*Message_LightBlockResponse) isMessage_Sum() {} |
|
|
|
|
|
|
|
func (m *Message) GetSum() isMessage_Sum { |
|
|
|
if m != nil { |
|
|
@ -123,6 +134,20 @@ func (m *Message) GetChunkResponse() *ChunkResponse { |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *Message) GetLightBlockRequest() *LightBlockRequest { |
|
|
|
if x, ok := m.GetSum().(*Message_LightBlockRequest); ok { |
|
|
|
return x.LightBlockRequest |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *Message) GetLightBlockResponse() *LightBlockResponse { |
|
|
|
if x, ok := m.GetSum().(*Message_LightBlockResponse); ok { |
|
|
|
return x.LightBlockResponse |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
|
|
func (*Message) XXX_OneofWrappers() []interface{} { |
|
|
|
return []interface{}{ |
|
|
@ -130,6 +155,8 @@ func (*Message) XXX_OneofWrappers() []interface{} { |
|
|
|
(*Message_SnapshotsResponse)(nil), |
|
|
|
(*Message_ChunkRequest)(nil), |
|
|
|
(*Message_ChunkResponse)(nil), |
|
|
|
(*Message_LightBlockRequest)(nil), |
|
|
|
(*Message_LightBlockResponse)(nil), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -381,43 +408,139 @@ func (m *ChunkResponse) GetMissing() bool { |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
type LightBlockRequest struct { |
|
|
|
Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockRequest) Reset() { *m = LightBlockRequest{} } |
|
|
|
func (m *LightBlockRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*LightBlockRequest) ProtoMessage() {} |
|
|
|
func (*LightBlockRequest) Descriptor() ([]byte, []int) { |
|
|
|
return fileDescriptor_a1c2869546ca7914, []int{5} |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) XXX_Unmarshal(b []byte) error { |
|
|
|
return m.Unmarshal(b) |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
|
|
if deterministic { |
|
|
|
return xxx_messageInfo_LightBlockRequest.Marshal(b, m, deterministic) |
|
|
|
} else { |
|
|
|
b = b[:cap(b)] |
|
|
|
n, err := m.MarshalToSizedBuffer(b) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return b[:n], nil |
|
|
|
} |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) XXX_Merge(src proto.Message) { |
|
|
|
xxx_messageInfo_LightBlockRequest.Merge(m, src) |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) XXX_Size() int { |
|
|
|
return m.Size() |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) XXX_DiscardUnknown() { |
|
|
|
xxx_messageInfo_LightBlockRequest.DiscardUnknown(m) |
|
|
|
} |
|
|
|
|
|
|
|
var xxx_messageInfo_LightBlockRequest proto.InternalMessageInfo |
|
|
|
|
|
|
|
func (m *LightBlockRequest) GetHeight() uint64 { |
|
|
|
if m != nil { |
|
|
|
return m.Height |
|
|
|
} |
|
|
|
return 0 |
|
|
|
} |
|
|
|
|
|
|
|
type LightBlockResponse struct { |
|
|
|
LightBlock *types.LightBlock `protobuf:"bytes,1,opt,name=light_block,json=lightBlock,proto3" json:"light_block,omitempty"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockResponse) Reset() { *m = LightBlockResponse{} } |
|
|
|
func (m *LightBlockResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*LightBlockResponse) ProtoMessage() {} |
|
|
|
func (*LightBlockResponse) Descriptor() ([]byte, []int) { |
|
|
|
return fileDescriptor_a1c2869546ca7914, []int{6} |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) XXX_Unmarshal(b []byte) error { |
|
|
|
return m.Unmarshal(b) |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
|
|
if deterministic { |
|
|
|
return xxx_messageInfo_LightBlockResponse.Marshal(b, m, deterministic) |
|
|
|
} else { |
|
|
|
b = b[:cap(b)] |
|
|
|
n, err := m.MarshalToSizedBuffer(b) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return b[:n], nil |
|
|
|
} |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) XXX_Merge(src proto.Message) { |
|
|
|
xxx_messageInfo_LightBlockResponse.Merge(m, src) |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) XXX_Size() int { |
|
|
|
return m.Size() |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) XXX_DiscardUnknown() { |
|
|
|
xxx_messageInfo_LightBlockResponse.DiscardUnknown(m) |
|
|
|
} |
|
|
|
|
|
|
|
var xxx_messageInfo_LightBlockResponse proto.InternalMessageInfo |
|
|
|
|
|
|
|
func (m *LightBlockResponse) GetLightBlock() *types.LightBlock { |
|
|
|
if m != nil { |
|
|
|
return m.LightBlock |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func init() { |
|
|
|
proto.RegisterType((*Message)(nil), "tendermint.statesync.Message") |
|
|
|
proto.RegisterType((*SnapshotsRequest)(nil), "tendermint.statesync.SnapshotsRequest") |
|
|
|
proto.RegisterType((*SnapshotsResponse)(nil), "tendermint.statesync.SnapshotsResponse") |
|
|
|
proto.RegisterType((*ChunkRequest)(nil), "tendermint.statesync.ChunkRequest") |
|
|
|
proto.RegisterType((*ChunkResponse)(nil), "tendermint.statesync.ChunkResponse") |
|
|
|
proto.RegisterType((*LightBlockRequest)(nil), "tendermint.statesync.LightBlockRequest") |
|
|
|
proto.RegisterType((*LightBlockResponse)(nil), "tendermint.statesync.LightBlockResponse") |
|
|
|
} |
|
|
|
|
|
|
|
func init() { proto.RegisterFile("tendermint/statesync/types.proto", fileDescriptor_a1c2869546ca7914) } |
|
|
|
|
|
|
|
var fileDescriptor_a1c2869546ca7914 = []byte{ |
|
|
|
// 393 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x6a, 0xdb, 0x40, |
|
|
|
0x18, 0x94, 0xfc, 0xcf, 0x57, 0xab, 0xd8, 0x8b, 0x29, 0xa2, 0x07, 0x61, 0x54, 0x68, 0x7b, 0x92, |
|
|
|
0xa0, 0x3d, 0xf6, 0xe6, 0x5e, 0x5c, 0x68, 0x2f, 0xdb, 0x18, 0x42, 0x2e, 0x61, 0x2d, 0x6f, 0x24, |
|
|
|
0x11, 0xb4, 0x52, 0xf4, 0xad, 0x20, 0x7e, 0x80, 0x9c, 0x72, 0xc9, 0x63, 0xe5, 0xe8, 0x63, 0xc8, |
|
|
|
0x29, 0xd8, 0x2f, 0x12, 0xb4, 0x92, 0x65, 0xc5, 0x31, 0x09, 0x81, 0xdc, 0x76, 0xc6, 0xe3, 0xd1, |
|
|
|
0xcc, 0xc0, 0x07, 0x63, 0xc9, 0xc5, 0x82, 0xa7, 0x51, 0x28, 0xa4, 0x8b, 0x92, 0x49, 0x8e, 0x4b, |
|
|
|
0xe1, 0xb9, 0x72, 0x99, 0x70, 0x74, 0x92, 0x34, 0x96, 0x31, 0x19, 0xed, 0x14, 0x4e, 0xa5, 0xb0, |
|
|
|
0xef, 0x1b, 0xd0, 0xfd, 0xc7, 0x11, 0x99, 0xcf, 0xc9, 0x0c, 0x86, 0x28, 0x58, 0x82, 0x41, 0x2c, |
|
|
|
0xf1, 0x34, 0xe5, 0x17, 0x19, 0x47, 0x69, 0xea, 0x63, 0xfd, 0xfb, 0x87, 0x1f, 0x5f, 0x9d, 0x43, |
|
|
|
0xff, 0x76, 0xfe, 0x6f, 0xe5, 0xb4, 0x50, 0x4f, 0x35, 0x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x1b, 0x85, 0x88, 0xa1, 0xf0, 0x55, 0xbd, 0x1e, 0xdd, 0xc2, 0xc9, 0xec, 0x76, |
|
|
|
0x6d, 0xe9, 0xab, 0xb5, 0xa5, 0x3f, 0xac, 0x2d, 0xfd, 0x66, 0x63, 0x69, 0xab, 0x8d, 0xa5, 0xdd, |
|
|
|
0x6d, 0x2c, 0xed, 0xe4, 0x97, 0x1f, 0xca, 0x20, 0x9b, 0x3b, 0x5e, 0x1c, 0xb9, 0xb5, 0xcb, 0xa9, |
|
|
|
0x3d, 0xd5, 0xd1, 0xb8, 0x87, 0xae, 0x6a, 0xde, 0x51, 0xbf, 0xfd, 0x7c, 0x0c, 0x00, 0x00, 0xff, |
|
|
|
0xff, 0xcc, 0x16, 0xc2, 0x8b, 0x74, 0x03, 0x00, 0x00, |
|
|
|
// 485 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x51, 0x6b, 0xd3, 0x50, |
|
|
|
0x14, 0x4e, 0x5c, 0xdb, 0x8d, 0xb3, 0x46, 0x96, 0x63, 0x91, 0x32, 0x46, 0x18, 0x11, 0x74, 0x20, |
|
|
|
0xa4, 0xa0, 0x8f, 0xe2, 0x4b, 0x7d, 0x99, 0x30, 0x5f, 0xee, 0x1c, 0xa8, 0x08, 0x23, 0x4d, 0xaf, |
|
|
|
0x4d, 0xb0, 0x49, 0x6a, 0xcf, 0x2d, 0xb8, 0x1f, 0xe0, 0x93, 0x2f, 0x82, 0x7f, 0xca, 0xc7, 0x3d, |
|
|
|
0xfa, 0x28, 0xed, 0x1f, 0x91, 0x9c, 0xdc, 0x26, 0x77, 0x6d, 0x5d, 0x11, 0xf6, 0x96, 0xef, 0xeb, |
|
|
|
0x77, 0x3e, 0xbe, 0x73, 0xcf, 0xe9, 0x81, 0x63, 0x25, 0xb3, 0xa1, 0x9c, 0xa6, 0x49, 0xa6, 0x7a, |
|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, 0xb1, 0xf0, 0xac, 0xeb, 0x85, 0x67, 0xfd, 0x5e, 0x78, 0xd6, 0x87, 0x17, |
|
|
|
0xa3, 0x44, 0xc5, 0xb3, 0x41, 0x10, 0xe5, 0x69, 0xcf, 0x3c, 0x2d, 0xf5, 0x27, 0x5f, 0x96, 0xde, |
|
|
|
0xa6, 0x73, 0x35, 0x68, 0xf1, 0x6f, 0xcf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x45, 0x35, |
|
|
|
0xee, 0xcd, 0x04, 0x00, 0x00, |
|
|
|
} |
|
|
|
|
|
|
|
func (m *Message) Marshal() (dAtA []byte, err error) { |
|
|
@ -536,6 +659,48 @@ func (m *Message_ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
} |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
func (m *Message_LightBlockRequest) MarshalTo(dAtA []byte) (int, error) { |
|
|
|
size := m.Size() |
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
} |
|
|
|
|
|
|
|
func (m *Message_LightBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
i := len(dAtA) |
|
|
|
if m.LightBlockRequest != nil { |
|
|
|
{ |
|
|
|
size, err := m.LightBlockRequest.MarshalToSizedBuffer(dAtA[:i]) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
i -= size |
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size)) |
|
|
|
} |
|
|
|
i-- |
|
|
|
dAtA[i] = 0x2a |
|
|
|
} |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
func (m *Message_LightBlockResponse) MarshalTo(dAtA []byte) (int, error) { |
|
|
|
size := m.Size() |
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
} |
|
|
|
|
|
|
|
func (m *Message_LightBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
i := len(dAtA) |
|
|
|
if m.LightBlockResponse != nil { |
|
|
|
{ |
|
|
|
size, err := m.LightBlockResponse.MarshalToSizedBuffer(dAtA[:i]) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
i -= size |
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size)) |
|
|
|
} |
|
|
|
i-- |
|
|
|
dAtA[i] = 0x32 |
|
|
|
} |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
func (m *SnapshotsRequest) Marshal() (dAtA []byte, err error) { |
|
|
|
size := m.Size() |
|
|
|
dAtA = make([]byte, size) |
|
|
@ -704,6 +869,69 @@ func (m *ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockRequest) Marshal() (dAtA []byte, err error) { |
|
|
|
size := m.Size() |
|
|
|
dAtA = make([]byte, size) |
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return dAtA[:n], nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockRequest) MarshalTo(dAtA []byte) (int, error) { |
|
|
|
size := m.Size() |
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
i := len(dAtA) |
|
|
|
_ = i |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.Height != 0 { |
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Height)) |
|
|
|
i-- |
|
|
|
dAtA[i] = 0x8 |
|
|
|
} |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockResponse) Marshal() (dAtA []byte, err error) { |
|
|
|
size := m.Size() |
|
|
|
dAtA = make([]byte, size) |
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return dAtA[:n], nil |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockResponse) MarshalTo(dAtA []byte) (int, error) { |
|
|
|
size := m.Size() |
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size]) |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
i := len(dAtA) |
|
|
|
_ = i |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.LightBlock != nil { |
|
|
|
{ |
|
|
|
size, err := m.LightBlock.MarshalToSizedBuffer(dAtA[:i]) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
i -= size |
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size)) |
|
|
|
} |
|
|
|
i-- |
|
|
|
dAtA[i] = 0xa |
|
|
|
} |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
|
|
|
|
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { |
|
|
|
offset -= sovTypes(v) |
|
|
|
base := offset |
|
|
@ -775,6 +1003,30 @@ func (m *Message_ChunkResponse) Size() (n int) { |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
func (m *Message_LightBlockRequest) Size() (n int) { |
|
|
|
if m == nil { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.LightBlockRequest != nil { |
|
|
|
l = m.LightBlockRequest.Size() |
|
|
|
n += 1 + l + sovTypes(uint64(l)) |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
func (m *Message_LightBlockResponse) Size() (n int) { |
|
|
|
if m == nil { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.LightBlockResponse != nil { |
|
|
|
l = m.LightBlockResponse.Size() |
|
|
|
n += 1 + l + sovTypes(uint64(l)) |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
func (m *SnapshotsRequest) Size() (n int) { |
|
|
|
if m == nil { |
|
|
|
return 0 |
|
|
@ -853,6 +1105,31 @@ func (m *ChunkResponse) Size() (n int) { |
|
|
|
return n |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockRequest) Size() (n int) { |
|
|
|
if m == nil { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.Height != 0 { |
|
|
|
n += 1 + sovTypes(uint64(m.Height)) |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
|
|
|
|
func (m *LightBlockResponse) Size() (n int) { |
|
|
|
if m == nil { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
if m.LightBlock != nil { |
|
|
|
l = m.LightBlock.Size() |
|
|
|
n += 1 + l + sovTypes(uint64(l)) |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
|
|
|
|
func sovTypes(x uint64) (n int) { |
|
|
|
return (math_bits.Len64(x|1) + 6) / 7 |
|
|
|
} |
|
|
@ -1028,6 +1305,76 @@ func (m *Message) Unmarshal(dAtA []byte) error { |
|
|
|
} |
|
|
|
m.Sum = &Message_ChunkResponse{v} |
|
|
|
iNdEx = postIndex |
|
|
|
case 5: |
|
|
|
if wireType != 2 { |
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LightBlockRequest", wireType) |
|
|
|
} |
|
|
|
var msglen int |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
msglen |= int(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
if msglen < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
postIndex := iNdEx + msglen |
|
|
|
if postIndex < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
if postIndex > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
v := &LightBlockRequest{} |
|
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
m.Sum = &Message_LightBlockRequest{v} |
|
|
|
iNdEx = postIndex |
|
|
|
case 6: |
|
|
|
if wireType != 2 { |
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LightBlockResponse", wireType) |
|
|
|
} |
|
|
|
var msglen int |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
msglen |= int(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
if msglen < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
postIndex := iNdEx + msglen |
|
|
|
if postIndex < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
if postIndex > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
v := &LightBlockResponse{} |
|
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
m.Sum = &Message_LightBlockResponse{v} |
|
|
|
iNdEx = postIndex |
|
|
|
default: |
|
|
|
iNdEx = preIndex |
|
|
|
skippy, err := skipTypes(dAtA[iNdEx:]) |
|
|
@ -1542,6 +1889,161 @@ func (m *ChunkResponse) Unmarshal(dAtA []byte) error { |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
func (m *LightBlockRequest) Unmarshal(dAtA []byte) error { |
|
|
|
l := len(dAtA) |
|
|
|
iNdEx := 0 |
|
|
|
for iNdEx < l { |
|
|
|
preIndex := iNdEx |
|
|
|
var wire uint64 |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
wire |= uint64(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
fieldNum := int32(wire >> 3) |
|
|
|
wireType := int(wire & 0x7) |
|
|
|
if wireType == 4 { |
|
|
|
return fmt.Errorf("proto: LightBlockRequest: wiretype end group for non-group") |
|
|
|
} |
|
|
|
if fieldNum <= 0 { |
|
|
|
return fmt.Errorf("proto: LightBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) |
|
|
|
} |
|
|
|
switch fieldNum { |
|
|
|
case 1: |
|
|
|
if wireType != 0 { |
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) |
|
|
|
} |
|
|
|
m.Height = 0 |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
m.Height |= uint64(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
default: |
|
|
|
iNdEx = preIndex |
|
|
|
skippy, err := skipTypes(dAtA[iNdEx:]) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
if (iNdEx + skippy) > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
iNdEx += skippy |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if iNdEx > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
func (m *LightBlockResponse) Unmarshal(dAtA []byte) error { |
|
|
|
l := len(dAtA) |
|
|
|
iNdEx := 0 |
|
|
|
for iNdEx < l { |
|
|
|
preIndex := iNdEx |
|
|
|
var wire uint64 |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
wire |= uint64(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
fieldNum := int32(wire >> 3) |
|
|
|
wireType := int(wire & 0x7) |
|
|
|
if wireType == 4 { |
|
|
|
return fmt.Errorf("proto: LightBlockResponse: wiretype end group for non-group") |
|
|
|
} |
|
|
|
if fieldNum <= 0 { |
|
|
|
return fmt.Errorf("proto: LightBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) |
|
|
|
} |
|
|
|
switch fieldNum { |
|
|
|
case 1: |
|
|
|
if wireType != 2 { |
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LightBlock", wireType) |
|
|
|
} |
|
|
|
var msglen int |
|
|
|
for shift := uint(0); ; shift += 7 { |
|
|
|
if shift >= 64 { |
|
|
|
return ErrIntOverflowTypes |
|
|
|
} |
|
|
|
if iNdEx >= l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
b := dAtA[iNdEx] |
|
|
|
iNdEx++ |
|
|
|
msglen |= int(b&0x7F) << shift |
|
|
|
if b < 0x80 { |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
if msglen < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
postIndex := iNdEx + msglen |
|
|
|
if postIndex < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
if postIndex > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
if m.LightBlock == nil { |
|
|
|
m.LightBlock = &types.LightBlock{} |
|
|
|
} |
|
|
|
if err := m.LightBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
iNdEx = postIndex |
|
|
|
default: |
|
|
|
iNdEx = preIndex |
|
|
|
skippy, err := skipTypes(dAtA[iNdEx:]) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 { |
|
|
|
return ErrInvalidLengthTypes |
|
|
|
} |
|
|
|
if (iNdEx + skippy) > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
iNdEx += skippy |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if iNdEx > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
func skipTypes(dAtA []byte) (n int, err error) { |
|
|
|
l := len(dAtA) |
|
|
|
iNdEx := 0 |
|
|
|