|
|
@ -5,7 +5,6 @@ package blockchain |
|
|
|
|
|
|
|
import ( |
|
|
|
fmt "fmt" |
|
|
|
_ "github.com/gogo/protobuf/gogoproto" |
|
|
|
proto "github.com/gogo/protobuf/proto" |
|
|
|
types "github.com/tendermint/tendermint/proto/types" |
|
|
|
io "io" |
|
|
@ -116,7 +115,7 @@ func (m *NoBlockResponse) GetHeight() int64 { |
|
|
|
|
|
|
|
// BlockResponse returns block to the requested
|
|
|
|
type BlockResponse struct { |
|
|
|
Block types.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block"` |
|
|
|
Block *types.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *BlockResponse) Reset() { *m = BlockResponse{} } |
|
|
@ -152,11 +151,11 @@ func (m *BlockResponse) XXX_DiscardUnknown() { |
|
|
|
|
|
|
|
var xxx_messageInfo_BlockResponse proto.InternalMessageInfo |
|
|
|
|
|
|
|
func (m *BlockResponse) GetBlock() types.Block { |
|
|
|
func (m *BlockResponse) GetBlock() *types.Block { |
|
|
|
if m != nil { |
|
|
|
return m.Block |
|
|
|
} |
|
|
|
return types.Block{} |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
// StatusRequest requests the status of a node (Height & Base)
|
|
|
@ -401,33 +400,31 @@ func init() { |
|
|
|
func init() { proto.RegisterFile("proto/blockchain/msgs.proto", fileDescriptor_ecf660069f8bb334) } |
|
|
|
|
|
|
|
var fileDescriptor_ecf660069f8bb334 = []byte{ |
|
|
|
// 401 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x4f, 0xe2, 0x40, |
|
|
|
0x14, 0xc7, 0xdb, 0x2d, 0xb0, 0xc9, 0x83, 0x42, 0xb6, 0x87, 0x5d, 0x02, 0xd9, 0xee, 0xa6, 0x07, |
|
|
|
0x22, 0x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xd8, 0x4c, 0xda, 0x3e, 0x16, 0x7f, 0x49, 0xa7, |
|
|
|
0xc2, 0x94, 0xd3, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xc4, 0x3a, 0x27, 0xad, 0x03, 0x00, |
|
|
|
0x00, |
|
|
|
// 371 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x4e, 0xf2, 0x40, |
|
|
|
0x14, 0x85, 0xdb, 0xbf, 0xc0, 0x9f, 0x5c, 0x28, 0xc4, 0x2e, 0x94, 0x48, 0x6c, 0x4c, 0x17, 0x46, |
|
|
|
0xd4, 0x0c, 0x11, 0x96, 0xba, 0x22, 0x2e, 0x48, 0x8c, 0xc6, 0x94, 0xc4, 0x05, 0x1b, 0xd2, 0xe2, |
|
|
|
0xa4, 0x6d, 0xb4, 0x1d, 0xe4, 0x4e, 0x17, 0xbe, 0x85, 0x8f, 0xe4, 0xd2, 0x25, 0x4b, 0x97, 0x06, |
|
|
|
0x5e, 0xc4, 0x30, 0x53, 0x0a, 0xad, 0x8a, 0xec, 0x66, 0x6e, 0xce, 0xf9, 0xe6, 0xf4, 0xdc, 0x14, |
|
|
|
0x1a, 0xe3, 0x09, 0xe3, 0xac, 0xe5, 0x3e, 0xb1, 0xd1, 0xe3, 0xc8, 0x77, 0x82, 0xa8, 0x15, 0xa2, |
|
|
|
0x87, 0x44, 0x4c, 0x8d, 0x06, 0xa7, 0xd1, 0x03, 0x9d, 0x84, 0x41, 0xc4, 0xe5, 0x84, 0xac, 0x74, |
|
|
|
0xfb, 0x7b, 0xd2, 0xc9, 0x5f, 0xc6, 0x14, 0xa5, 0x5f, 0x6a, 0xac, 0x23, 0xa8, 0x74, 0x17, 0x57, |
|
|
|
0x9b, 0x3e, 0xc7, 0x14, 0xb9, 0xb1, 0x0b, 0x25, 0x9f, 0x06, 0x9e, 0xcf, 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 0x82, 0x86, 0x71, 0xd8, 0xbd, 0x7e, 0x9f, 0x99, 0xea, |
|
|
|
0x74, 0x66, 0xaa, 0x9f, 0x33, 0x53, 0x7d, 0x9d, 0x9b, 0xca, 0x74, 0x6e, 0x2a, 0x1f, 0x73, 0x53, |
|
|
|
0x19, 0x9c, 0x7b, 0x01, 0xf7, 0x63, 0x97, 0x8c, 0x58, 0xd8, 0x5a, 0xbd, 0xb4, 0x7e, 0xcc, 0xff, |
|
|
|
0x64, 0x6e, 0x49, 0x4c, 0x3a, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x55, 0x3b, 0x57, 0xfa, 0x7f, |
|
|
|
0x03, 0x00, 0x00, |
|
|
|
} |
|
|
|
|
|
|
|
func (m *BlockRequest) Marshal() (dAtA []byte, err error) { |
|
|
@ -506,16 +503,18 @@ func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
|
|
|
_ = i |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
{ |
|
|
|
size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
if m.Block != nil { |
|
|
|
{ |
|
|
|
size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
i -= size |
|
|
|
i = encodeVarintMsgs(dAtA, i, uint64(size)) |
|
|
|
} |
|
|
|
i -= size |
|
|
|
i = encodeVarintMsgs(dAtA, i, uint64(size)) |
|
|
|
i-- |
|
|
|
dAtA[i] = 0xa |
|
|
|
} |
|
|
|
i-- |
|
|
|
dAtA[i] = 0xa |
|
|
|
return len(dAtA) - i, nil |
|
|
|
} |
|
|
|
|
|
|
@ -763,8 +762,10 @@ func (m *BlockResponse) Size() (n int) { |
|
|
|
} |
|
|
|
var l int |
|
|
|
_ = l |
|
|
|
l = m.Block.Size() |
|
|
|
n += 1 + l + sovMsgs(uint64(l)) |
|
|
|
if m.Block != nil { |
|
|
|
l = m.Block.Size() |
|
|
|
n += 1 + l + sovMsgs(uint64(l)) |
|
|
|
} |
|
|
|
return n |
|
|
|
} |
|
|
|
|
|
|
@ -1079,6 +1080,9 @@ func (m *BlockResponse) Unmarshal(dAtA []byte) error { |
|
|
|
if postIndex > l { |
|
|
|
return io.ErrUnexpectedEOF |
|
|
|
} |
|
|
|
if m.Block == nil { |
|
|
|
m.Block = &types.Block{} |
|
|
|
} |
|
|
|
if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|