refactor: remove comet info from consensus as it will be stored in context for v2 (backport #21120) (#21131)
Co-authored-by: Marko <marko@baricevic.me>
This commit is contained in:
parent
0ca08e1ee1
commit
003d2ff2a7
File diff suppressed because it is too large
Load Diff
@ -21,8 +21,7 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params"
|
||||
Query_GetCometInfo_FullMethodName = "/cosmos.consensus.v1.Query/GetCometInfo"
|
||||
Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
@ -31,8 +30,6 @@ const (
|
||||
type QueryClient interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -52,23 +49,12 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) {
|
||||
out := new(QueryGetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GetCometInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
type QueryServer interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
@ -79,9 +65,6 @@ type UnimplementedQueryServer struct {
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -113,24 +96,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetCometInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GetCometInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -142,10 +107,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCometInfo",
|
||||
Handler: _Query_GetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/query.proto",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,6 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams"
|
||||
Msg_SetCometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/SetCometInfo"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
@ -32,8 +31,6 @@ type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -53,15 +50,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) {
|
||||
out := new(MsgSetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_SetCometInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
@ -69,8 +57,6 @@ type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
@ -81,9 +67,6 @@ type UnimplementedMsgServer struct {
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -115,24 +98,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSetCometInfo)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_SetCometInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -144,10 +109,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetCometInfo",
|
||||
Handler: _Msg_SetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/tx.proto",
|
||||
|
||||
@ -400,24 +400,6 @@ func (c *Consensus[T]) FinalizeBlock(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO evaluate this approach vs. service using context.
|
||||
// cometInfo := &consensustypes.MsgUpdateCometInfo{
|
||||
// Authority: c.consensusAuthority,
|
||||
// CometInfo: &consensustypes.CometInfo{
|
||||
// Evidence: req.Misbehavior,
|
||||
// ValidatorsHash: req.NextValidatorsHash,
|
||||
// ProposerAddress: req.ProposerAddress,
|
||||
// LastCommit: req.DecidedLastCommit,
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// ctx = context.WithValue(ctx, corecontext.CometInfoKey, &comet.Info{
|
||||
// Evidence: sdktypes.ToSDKEvidence(req.Misbehavior),
|
||||
// ValidatorsHash: req.NextValidatorsHash,
|
||||
// ProposerAddress: req.ProposerAddress,
|
||||
// LastCommit: sdktypes.ToSDKCommitInfo(req.DecidedLastCommit),
|
||||
// })
|
||||
|
||||
// we don't need to deliver the block in the genesis block
|
||||
if req.Height == int64(c.initialHeight) {
|
||||
appHash, err := c.store.Commit(store.NewChangeset())
|
||||
@ -450,7 +432,6 @@ func (c *Consensus[T]) FinalizeBlock(
|
||||
AppHash: cid.Hash,
|
||||
ChainId: c.chainID,
|
||||
Txs: decodedTxs,
|
||||
// ConsensusMessages: []transaction.Msg{cometInfo},
|
||||
}
|
||||
|
||||
ciCtx := contextWithCometInfo(ctx, comet.Info{
|
||||
|
||||
@ -149,7 +149,7 @@ func (s STF[T]) DeliverBlock(
|
||||
if err = isCtxCancelled(ctx); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
txResults[i] = s.deliverTx(ctx, newState, txBytes, transaction.ExecModeFinalize, hi)
|
||||
txResults[i] = s.deliverTx(exCtx, newState, txBytes, transaction.ExecModeFinalize, hi)
|
||||
}
|
||||
// reset events
|
||||
exCtx.events = make([]event.Event, 0)
|
||||
@ -564,10 +564,10 @@ func (s STF[T]) makeContext(
|
||||
) *executionContext {
|
||||
valuedCtx := context.WithValue(ctx, corecontext.ExecModeKey, execMode)
|
||||
return newExecutionContext(
|
||||
valuedCtx,
|
||||
s.makeGasMeter,
|
||||
s.makeGasMeteredState,
|
||||
s.branchFn,
|
||||
valuedCtx,
|
||||
sender,
|
||||
store,
|
||||
execMode,
|
||||
@ -577,10 +577,10 @@ func (s STF[T]) makeContext(
|
||||
}
|
||||
|
||||
func newExecutionContext(
|
||||
ctx context.Context,
|
||||
makeGasMeterFn makeGasMeterFn,
|
||||
makeGasMeteredStoreFn makeGasMeteredStateFn,
|
||||
branchFn branchFn,
|
||||
ctx context.Context,
|
||||
sender transaction.Identity,
|
||||
state store.WriterMap,
|
||||
execMode transaction.ExecMode,
|
||||
|
||||
@ -30,5 +30,4 @@ type FeegrantKeeper interface {
|
||||
|
||||
type ConsensusKeeper interface {
|
||||
Params(context.Context, *consensustypes.QueryParamsRequest) (*consensustypes.QueryParamsResponse, error)
|
||||
GetCometInfo(ctx context.Context, request *consensustypes.QueryGetCometInfoRequest) (*consensustypes.QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
@ -195,21 +195,6 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// GetCometInfo mocks base method.
|
||||
func (m *MockConsensusKeeper) GetCometInfo(ctx context.Context, request *types0.QueryGetCometInfoRequest) (*types0.QueryGetCometInfoResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetCometInfo", ctx, request)
|
||||
ret0, _ := ret[0].(*types0.QueryGetCometInfoResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetCometInfo indicates an expected call of GetCometInfo.
|
||||
func (mr *MockConsensusKeeperMockRecorder) GetCometInfo(ctx, request interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCometInfo", reflect.TypeOf((*MockConsensusKeeper)(nil).GetCometInfo), ctx, request)
|
||||
}
|
||||
|
||||
// Params mocks base method.
|
||||
func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types0.QueryParamsRequest) (*types0.QueryParamsResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -12,7 +11,6 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
coreapp "cosmossdk.io/core/app"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/event"
|
||||
"cosmossdk.io/x/consensus/exported"
|
||||
@ -28,8 +26,6 @@ type Keeper struct {
|
||||
|
||||
authority string
|
||||
ParamsStore collections.Item[cmtproto.ConsensusParams]
|
||||
// storage of the last comet info
|
||||
cometInfo collections.Item[types.CometInfo]
|
||||
}
|
||||
|
||||
var _ exported.ConsensusParamSetter = Keeper{}.ParamsStore
|
||||
@ -40,7 +36,6 @@ func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, authority strin
|
||||
Environment: env,
|
||||
authority: authority,
|
||||
ParamsStore: collections.NewItem(sb, collections.NewPrefix("Consensus"), "params", codec.CollValue[cmtproto.ConsensusParams](cdc)),
|
||||
cometInfo: collections.NewItem(sb, collections.NewPrefix("CometInfo"), "comet_info", codec.CollValue[types.CometInfo](cdc)),
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,31 +107,3 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*
|
||||
|
||||
return &types.MsgUpdateParamsResponse{}, nil
|
||||
}
|
||||
|
||||
func (k Keeper) SetCometInfo(ctx context.Context, msg *types.MsgSetCometInfo) (*types.MsgSetCometInfoResponse, error) {
|
||||
if !bytes.Equal(coreapp.ConsensusIdentity, []byte(msg.Authority)) {
|
||||
return nil, fmt.Errorf("invalid authority; expected %s, got %s", coreapp.ConsensusIdentity, msg.Authority)
|
||||
}
|
||||
|
||||
cometInfo := types.CometInfo{
|
||||
Evidence: msg.Evidence,
|
||||
ValidatorsHash: msg.ValidatorsHash,
|
||||
ProposerAddress: msg.ProposerAddress,
|
||||
LastCommit: msg.LastCommit,
|
||||
}
|
||||
|
||||
if err := k.cometInfo.Set(ctx, cometInfo); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &types.MsgSetCometInfoResponse{}, nil
|
||||
}
|
||||
|
||||
func (k Keeper) GetCometInfo(ctx context.Context, _ *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) {
|
||||
cometInfo, err := k.cometInfo.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryGetCometInfoResponse{CometInfo: &cometInfo}, nil
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
gogotypes "github.com/cosmos/gogoproto/types"
|
||||
@ -604,53 +603,3 @@ func (s *KeeperTestSuite) TestUpdateParams() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *KeeperTestSuite) TestSetCometInfo() {
|
||||
consensusIdentiy := "consensus"
|
||||
testCases := []struct {
|
||||
name string
|
||||
enabledFeatures bool
|
||||
input *types.MsgSetCometInfo
|
||||
expErr bool
|
||||
expErrMsg string
|
||||
}{
|
||||
{
|
||||
name: "valid comet info",
|
||||
input: &types.MsgSetCometInfo{
|
||||
Authority: consensusIdentiy,
|
||||
Evidence: []*v1.Misbehavior{},
|
||||
ValidatorsHash: []byte("validatorhash"),
|
||||
ProposerAddress: []byte("proposeraddress"),
|
||||
LastCommit: &v1.CommitInfo{},
|
||||
},
|
||||
expErr: false,
|
||||
expErrMsg: "",
|
||||
},
|
||||
{
|
||||
name: "invalid authority",
|
||||
input: &types.MsgSetCometInfo{
|
||||
Authority: "invalid",
|
||||
Evidence: []*v1.Misbehavior{},
|
||||
ValidatorsHash: []byte("validatorhash"),
|
||||
ProposerAddress: []byte("proposeraddress"),
|
||||
LastCommit: &v1.CommitInfo{},
|
||||
},
|
||||
expErr: true,
|
||||
expErrMsg: "invalid authority",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.Run(tc.name, func() {
|
||||
s.SetupTest(tc.enabledFeatures)
|
||||
_, err := s.consensusParamsKeeper.SetCometInfo(s.ctx, tc.input)
|
||||
if tc.expErr {
|
||||
s.Require().Error(err)
|
||||
s.Require().Contains(err.Error(), tc.expErrMsg)
|
||||
} else {
|
||||
s.Require().NoError(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,18 +14,6 @@ service Query {
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/consensus/v1/params";
|
||||
}
|
||||
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
rpc GetCometInfo(QueryGetCometInfoRequest) returns (QueryGetCometInfoResponse);
|
||||
}
|
||||
|
||||
// QueryCometInfoRequest defines the request type for querying x/consensus comet info.
|
||||
message QueryGetCometInfoRequest {}
|
||||
|
||||
// QueryCometInfoResponse defines the response type for querying x/consensus comet info.
|
||||
message QueryGetCometInfoResponse {
|
||||
// comet_info is the comet info of the x/consensus module.
|
||||
CometInfo comet_info = 1;
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/consensus parameters.
|
||||
|
||||
@ -19,9 +19,6 @@ service Msg {
|
||||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) {
|
||||
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47";
|
||||
}
|
||||
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
rpc SetCometInfo(MsgSetCometInfo) returns (MsgSetCometInfoResponse);
|
||||
}
|
||||
|
||||
// MsgUpdateParams is the Msg/UpdateParams request type.
|
||||
@ -50,27 +47,3 @@ message MsgUpdateParams {
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
// MsgUpdateParams message.
|
||||
message MsgUpdateParamsResponse {}
|
||||
|
||||
// MsgCometInfo is the Msg/CometInfo request type.
|
||||
message MsgSetCometInfo {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo";
|
||||
|
||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// evidence is the misbehaviour evidence to submit.
|
||||
repeated cometbft.abci.v1.Misbehavior evidence = 2;
|
||||
|
||||
// validators_hash is the hash of the current validator set.
|
||||
bytes validators_hash = 3;
|
||||
|
||||
// proposer_address is the address of the current proposer.
|
||||
bytes proposer_address = 4;
|
||||
|
||||
// last_commit is the last commit info.
|
||||
cometbft.abci.v1.CommitInfo last_commit = 5;
|
||||
}
|
||||
|
||||
// MsgCometInfoResponse defines the response
|
||||
message MsgSetCometInfoResponse {}
|
||||
|
||||
@ -29,89 +29,6 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// QueryCometInfoRequest defines the request type for querying x/consensus comet info.
|
||||
type QueryGetCometInfoRequest struct {
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) Reset() { *m = QueryGetCometInfoRequest{} }
|
||||
func (m *QueryGetCometInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetCometInfoRequest) ProtoMessage() {}
|
||||
func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{0}
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetCometInfoRequest.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 *QueryGetCometInfoRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetCometInfoRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetCometInfoRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetCometInfoRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryCometInfoResponse defines the response type for querying x/consensus comet info.
|
||||
type QueryGetCometInfoResponse struct {
|
||||
// comet_info is the comet info of the x/consensus module.
|
||||
CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) Reset() { *m = QueryGetCometInfoResponse{} }
|
||||
func (m *QueryGetCometInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetCometInfoResponse) ProtoMessage() {}
|
||||
func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{1}
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetCometInfoResponse.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 *QueryGetCometInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetCometInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetCometInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetCometInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetCometInfoResponse) GetCometInfo() *CometInfo {
|
||||
if m != nil {
|
||||
return m.CometInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/consensus parameters.
|
||||
type QueryParamsRequest struct {
|
||||
}
|
||||
@ -120,7 +37,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
|
||||
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsRequest) ProtoMessage() {}
|
||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{2}
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{0}
|
||||
}
|
||||
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -161,7 +78,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
|
||||
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsResponse) ProtoMessage() {}
|
||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{3}
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{1}
|
||||
}
|
||||
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -198,8 +115,6 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryGetCometInfoRequest)(nil), "cosmos.consensus.v1.QueryGetCometInfoRequest")
|
||||
proto.RegisterType((*QueryGetCometInfoResponse)(nil), "cosmos.consensus.v1.QueryGetCometInfoResponse")
|
||||
proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest")
|
||||
proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse")
|
||||
}
|
||||
@ -207,29 +122,25 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) }
|
||||
|
||||
var fileDescriptor_bf54d1e5df04cee9 = []byte{
|
||||
// 342 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc3, 0x30,
|
||||
0x10, 0x85, 0x6b, 0x24, 0x2a, 0x61, 0x98, 0x5c, 0x86, 0x12, 0xc0, 0xa0, 0x74, 0xa0, 0x0b, 0xb6,
|
||||
0x5a, 0x16, 0x84, 0xc4, 0x02, 0x03, 0x62, 0xa3, 0x8c, 0x5d, 0x50, 0x1a, 0xdc, 0x2a, 0x82, 0xf8,
|
||||
0xd2, 0xda, 0xad, 0xe8, 0x86, 0xf8, 0x05, 0x48, 0xfc, 0x29, 0xc6, 0x4a, 0x2c, 0x8c, 0x28, 0xe1,
|
||||
0x4f, 0xb0, 0xa1, 0xd8, 0x09, 0x2d, 0xc2, 0x08, 0xb6, 0x28, 0xf7, 0xee, 0xbd, 0xef, 0x5d, 0x82,
|
||||
0x77, 0x42, 0x50, 0x31, 0x28, 0x1e, 0x82, 0x54, 0x42, 0xaa, 0xb1, 0xe2, 0x93, 0x16, 0x1f, 0x8e,
|
||||
0xc5, 0x68, 0xca, 0x92, 0x11, 0x68, 0x20, 0x35, 0x2b, 0x60, 0x5f, 0x02, 0x36, 0x69, 0x79, 0x5b,
|
||||
0x03, 0x80, 0xc1, 0xad, 0xe0, 0x41, 0x12, 0xf1, 0x40, 0x4a, 0xd0, 0x81, 0x8e, 0x40, 0x2a, 0xbb,
|
||||
0xe2, 0xd1, 0x10, 0x62, 0xa1, 0x7b, 0x7d, 0xcd, 0xf5, 0x34, 0x11, 0xc6, 0x31, 0x09, 0x46, 0x41,
|
||||
0x5c, 0xce, 0x1b, 0xae, 0xcc, 0xb9, 0xbf, 0x11, 0xf9, 0x1e, 0xae, 0x77, 0x72, 0x8c, 0x33, 0xa1,
|
||||
0x4f, 0x73, 0xbb, 0x73, 0xd9, 0x87, 0x4b, 0x31, 0x1c, 0x0b, 0xa5, 0xfd, 0x2e, 0xde, 0x70, 0xcc,
|
||||
0x54, 0x92, 0x5b, 0x90, 0x63, 0x8c, 0x4d, 0xfe, 0x55, 0x24, 0xfb, 0x50, 0x47, 0xbb, 0xa8, 0xb9,
|
||||
0xda, 0xa6, 0xcc, 0xd1, 0x82, 0xcd, 0x77, 0x57, 0xc2, 0xf2, 0xd1, 0x5f, 0xc7, 0xc4, 0x78, 0x5f,
|
||||
0x18, 0xe2, 0x32, 0xb1, 0x83, 0x6b, 0xdf, 0xde, 0x16, 0x59, 0x47, 0xb8, 0x6a, 0x9b, 0x15, 0x39,
|
||||
0x3e, 0x2b, 0xab, 0x33, 0x53, 0xdd, 0xa6, 0x14, 0x91, 0xc5, 0x6e, 0xb1, 0xd1, 0xfe, 0x40, 0x78,
|
||||
0xd9, 0x78, 0x92, 0x7b, 0x84, 0xab, 0x76, 0x48, 0xf6, 0x9c, 0xa0, 0x3f, 0x81, 0xbc, 0xe6, 0xdf,
|
||||
0x42, 0xcb, 0xe8, 0x37, 0x1e, 0x5e, 0xde, 0x9f, 0x96, 0xb6, 0xc9, 0x26, 0x77, 0x9d, 0xdd, 0xc2,
|
||||
0x90, 0x18, 0xaf, 0x2d, 0x1e, 0x93, 0xec, 0xff, 0x6e, 0xef, 0xf8, 0x20, 0x1e, 0xfb, 0xaf, 0xdc,
|
||||
0x32, 0x9d, 0x1c, 0x3e, 0xa7, 0x14, 0xcd, 0x52, 0x8a, 0xde, 0x52, 0x8a, 0x1e, 0x33, 0x5a, 0x99,
|
||||
0x65, 0xb4, 0xf2, 0x9a, 0xd1, 0x4a, 0x97, 0x5a, 0x23, 0x75, 0x7d, 0xc3, 0x22, 0xe0, 0x77, 0x0b,
|
||||
0xb0, 0xe6, 0xa0, 0xbd, 0xaa, 0xf9, 0x3b, 0x0e, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xd8,
|
||||
0xe1, 0x00, 0xb8, 0x02, 0x00, 0x00,
|
||||
// 278 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce,
|
||||
0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4,
|
||||
0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0,
|
||||
0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c,
|
||||
0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x68, 0x91,
|
||||
0x92, 0x4b, 0xce, 0xcf, 0x4d, 0x2d, 0x49, 0x4a, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x05, 0x9b,
|
||||
0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x93, 0x57, 0xc6, 0x66, 0x27, 0xc2, 0x7c, 0xb0, 0x22, 0x25,
|
||||
0x11, 0x2e, 0xa1, 0x40, 0x90, 0x33, 0x02, 0xc0, 0x3a, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b,
|
||||
0x94, 0x02, 0xb9, 0x84, 0x51, 0x44, 0x8b, 0x0b, 0x40, 0xda, 0x84, 0xac, 0xb8, 0xd8, 0x20, 0x36,
|
||||
0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x29, 0xe9, 0xc1, 0x9c, 0xa0, 0x07, 0x76, 0x82, 0x5e,
|
||||
0x99, 0xa1, 0x9e, 0x33, 0xcc, 0x02, 0xa8, 0x5e, 0xa8, 0x0e, 0xa3, 0x2e, 0x46, 0x2e, 0x56, 0xb0,
|
||||
0x99, 0x42, 0x0d, 0x8c, 0x5c, 0x6c, 0x10, 0x49, 0x21, 0x75, 0x3d, 0x2c, 0xde, 0xd6, 0xc3, 0x74,
|
||||
0x90, 0x94, 0x06, 0x61, 0x85, 0x10, 0x37, 0x2a, 0x29, 0x37, 0x5d, 0x7e, 0x32, 0x99, 0x49, 0x56,
|
||||
0x48, 0x5a, 0x1f, 0x9b, 0xf7, 0x21, 0x8e, 0x71, 0xb2, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23,
|
||||
0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6,
|
||||
0x63, 0x39, 0x86, 0x28, 0x39, 0x88, 0xae, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, 0x7c, 0xfd, 0x0a, 0x24,
|
||||
0xdd, 0x60, 0x1f, 0x26, 0xb1, 0x81, 0x83, 0xcd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xb9,
|
||||
0xf1, 0x10, 0xd1, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -246,8 +157,6 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type QueryClient interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -267,21 +176,10 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) {
|
||||
out := new(QueryGetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/GetCometInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@ -291,9 +189,6 @@ type UnimplementedQueryServer struct {
|
||||
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) GetCometInfo(ctx context.Context, req *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@ -317,24 +212,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetCometInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.consensus.v1.Query/GetCometInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.consensus.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@ -343,73 +220,11 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCometInfo",
|
||||
Handler: _Query_GetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/query.proto",
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) 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 *QueryGetCometInfoRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) 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 *QueryGetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.CometInfo != nil {
|
||||
{
|
||||
size, err := m.CometInfo.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@ -479,28 +294,6 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.CometInfo != nil {
|
||||
l = m.CometInfo.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryParamsRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@ -529,142 +322,6 @@ func sovQuery(x uint64) (n int) {
|
||||
func sozQuery(x uint64) (n int) {
|
||||
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) 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 ErrIntOverflowQuery
|
||||
}
|
||||
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: QueryGetCometInfoRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) 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 ErrIntOverflowQuery
|
||||
}
|
||||
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: QueryGetCometInfoResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CometInfo", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.CometInfo == nil {
|
||||
m.CometInfo = &CometInfo{}
|
||||
}
|
||||
if err := m.CometInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -6,7 +6,7 @@ package types
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
_ "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
@ -171,177 +171,47 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgCometInfo is the Msg/CometInfo request type.
|
||||
type MsgSetCometInfo struct {
|
||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
// evidence is the misbehaviour evidence to submit.
|
||||
Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
// validators_hash is the hash of the current validator set.
|
||||
ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
|
||||
// proposer_address is the address of the current proposer.
|
||||
ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
|
||||
// last_commit is the last commit info.
|
||||
LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) Reset() { *m = MsgSetCometInfo{} }
|
||||
func (m *MsgSetCometInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSetCometInfo) ProtoMessage() {}
|
||||
func (*MsgSetCometInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2135c60575ab504d, []int{2}
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSetCometInfo.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 *MsgSetCometInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSetCometInfo.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSetCometInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSetCometInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgSetCometInfo) GetAuthority() string {
|
||||
if m != nil {
|
||||
return m.Authority
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetValidatorsHash() []byte {
|
||||
if m != nil {
|
||||
return m.ValidatorsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetProposerAddress() []byte {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo {
|
||||
if m != nil {
|
||||
return m.LastCommit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MsgCometInfoResponse defines the response
|
||||
type MsgSetCometInfoResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) Reset() { *m = MsgSetCometInfoResponse{} }
|
||||
func (m *MsgSetCometInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSetCometInfoResponse) ProtoMessage() {}
|
||||
func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2135c60575ab504d, []int{3}
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSetCometInfoResponse.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 *MsgSetCometInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSetCometInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSetCometInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSetCometInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams")
|
||||
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse")
|
||||
proto.RegisterType((*MsgSetCometInfo)(nil), "cosmos.consensus.v1.MsgSetCometInfo")
|
||||
proto.RegisterType((*MsgSetCometInfoResponse)(nil), "cosmos.consensus.v1.MsgSetCometInfoResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) }
|
||||
|
||||
var fileDescriptor_2135c60575ab504d = []byte{
|
||||
// 649 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x4f, 0xd4, 0x40,
|
||||
0x18, 0xa6, 0x7c, 0xba, 0xc3, 0xc6, 0xd5, 0x41, 0x43, 0xd9, 0x60, 0xb3, 0xae, 0x46, 0x91, 0x48,
|
||||
0xcb, 0x22, 0xa2, 0x90, 0x90, 0xc8, 0x12, 0x0d, 0x1c, 0x88, 0xa6, 0x04, 0x0f, 0x5e, 0x36, 0xd3,
|
||||
0x76, 0xd8, 0x36, 0xd0, 0x4e, 0xd3, 0x19, 0x2a, 0x7b, 0x33, 0x1e, 0x3d, 0xf9, 0x47, 0x4c, 0x38,
|
||||
0xf0, 0x23, 0x8c, 0x17, 0x89, 0x27, 0xe3, 0xc9, 0xec, 0x1e, 0x36, 0xfe, 0x0b, 0xd3, 0x99, 0x7e,
|
||||
0xec, 0x47, 0x37, 0x31, 0x5e, 0x9a, 0x74, 0xde, 0xe7, 0x79, 0xde, 0x77, 0x9e, 0xf7, 0x69, 0xc1,
|
||||
0xa2, 0x49, 0xa8, 0x4b, 0xa8, 0x66, 0x12, 0x8f, 0x62, 0x8f, 0x9e, 0x51, 0x2d, 0xac, 0x69, 0xec,
|
||||
0x5c, 0xf5, 0x03, 0xc2, 0x08, 0x9c, 0x13, 0x55, 0x35, 0xad, 0xaa, 0x61, 0xad, 0x7c, 0x13, 0xb9,
|
||||
0x8e, 0x47, 0x34, 0xfe, 0x14, 0xb8, 0xf2, 0x82, 0xc0, 0x35, 0xf8, 0x9b, 0x16, 0x93, 0x44, 0x69,
|
||||
0x3e, 0x6e, 0xe0, 0xd2, 0x66, 0x24, 0xed, 0xd2, 0x66, 0x5c, 0x50, 0x4c, 0xe2, 0x62, 0x66, 0x1c,
|
||||
0x33, 0x8d, 0xb5, 0x7c, 0xcc, 0xfb, 0xfa, 0x28, 0x40, 0x6e, 0x42, 0x5c, 0x4c, 0xeb, 0xc8, 0x30,
|
||||
0x1d, 0x3e, 0x56, 0x84, 0x13, 0xd5, 0xea, 0x97, 0x49, 0x50, 0x3a, 0xa0, 0xcd, 0x23, 0xdf, 0x42,
|
||||
0x0c, 0xbf, 0xe1, 0x3c, 0xb8, 0x01, 0x0a, 0xe8, 0x8c, 0xd9, 0x24, 0x70, 0x58, 0x4b, 0x96, 0x2a,
|
||||
0xd2, 0x52, 0xa1, 0x2e, 0xff, 0xb8, 0x5c, 0xb9, 0x15, 0xcf, 0xb3, 0x63, 0x59, 0x01, 0xa6, 0xf4,
|
||||
0x90, 0x05, 0x8e, 0xd7, 0xd4, 0x33, 0x28, 0x5c, 0x07, 0x53, 0xc6, 0x29, 0x31, 0x4f, 0xe4, 0xf1,
|
||||
0x8a, 0xb4, 0x34, 0xbb, 0xa6, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x6b, 0x6a, 0x3d, 0xaa, 0x8b,
|
||||
0x36, 0xba, 0x00, 0xc3, 0x6d, 0x70, 0x0d, 0x87, 0x8e, 0x85, 0x3d, 0x13, 0xcb, 0x13, 0x9c, 0x78,
|
||||
0x37, 0x87, 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x42, 0x88, 0x4e, 0x1d, 0x0b,
|
||||
0x31, 0x12, 0xc8, 0x93, 0x9c, 0x5f, 0xcd, 0xe1, 0xbf, 0x4d, 0x30, 0xb1, 0x40, 0x46, 0x82, 0x7b,
|
||||
0x60, 0x32, 0x72, 0x46, 0x9e, 0xe2, 0xe4, 0x3b, 0x39, 0xe4, 0x9d, 0xfa, 0xee, 0xbe, 0xe0, 0xd5,
|
||||
0x6f, 0xff, 0xba, 0x5c, 0x29, 0x09, 0x23, 0x56, 0xa8, 0x75, 0x52, 0x59, 0x55, 0x9f, 0xae, 0xca,
|
||||
0x92, 0xce, 0x15, 0xe0, 0x11, 0x28, 0xd0, 0x96, 0x67, 0xda, 0x01, 0xf1, 0x5a, 0xf2, 0xf4, 0xc8,
|
||||
0x59, 0x0e, 0x13, 0x4c, 0xac, 0x39, 0x37, 0xac, 0x59, 0xd3, 0x33, 0x25, 0xf8, 0x1a, 0xcc, 0x1c,
|
||||
0x63, 0xc4, 0xce, 0x02, 0x2c, 0xcf, 0x70, 0xd1, 0x4a, 0x8e, 0xe8, 0x2b, 0x81, 0x18, 0x2d, 0xb9,
|
||||
0xa6, 0x27, 0x2a, 0x5b, 0x9b, 0x1f, 0xbb, 0x17, 0xcb, 0xd9, 0xe2, 0x3e, 0x75, 0x2f, 0x96, 0x1f,
|
||||
0x64, 0x60, 0xed, 0xbc, 0x27, 0xc5, 0x03, 0xd9, 0xa8, 0x2e, 0x80, 0xf9, 0x81, 0x23, 0x1d, 0x53,
|
||||
0x3f, 0x82, 0x57, 0xbf, 0x8f, 0xf3, 0x28, 0x1d, 0x62, 0xb6, 0x1b, 0x4d, 0xb7, 0xef, 0x1d, 0x93,
|
||||
0xff, 0x8e, 0xd2, 0x66, 0x4f, 0x28, 0xc6, 0x2b, 0x13, 0xfd, 0x7b, 0x89, 0xbc, 0x8e, 0xae, 0x7c,
|
||||
0xe0, 0x50, 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x13, 0x88, 0x87, 0xa0, 0x94, 0xee, 0x96, 0x36,
|
||||
0x6c, 0x44, 0x6d, 0x1e, 0xab, 0xa2, 0x7e, 0x3d, 0x3b, 0xde, 0x43, 0xd4, 0x86, 0x8f, 0xc0, 0x0d,
|
||||
0x3f, 0x20, 0x3e, 0xa1, 0x38, 0x68, 0x20, 0x31, 0x08, 0x0f, 0x50, 0x51, 0x2f, 0x25, 0xe7, 0xf1,
|
||||
0x7c, 0x70, 0x1b, 0xcc, 0x9e, 0x22, 0xca, 0x1a, 0x26, 0x71, 0x5d, 0x87, 0xc5, 0x49, 0x59, 0x1c,
|
||||
0x9e, 0x68, 0x97, 0xd7, 0xa3, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf7, 0xad, 0x8d, 0x61, 0xbf, 0xef,
|
||||
0x8d, 0xf6, 0x3b, 0x75, 0x2f, 0x36, 0xbb, 0xd7, 0xd0, 0xc4, 0xec, 0xb5, 0x3f, 0x12, 0x98, 0x38,
|
||||
0xa0, 0x4d, 0xf8, 0x1e, 0x14, 0xfb, 0xbe, 0xdd, 0xfb, 0x6a, 0xce, 0xaf, 0x46, 0x1d, 0x58, 0x59,
|
||||
0xf9, 0xf1, 0xbf, 0xa0, 0xd2, 0xc5, 0xce, 0x7d, 0x1b, 0x0c, 0xd3, 0xfa, 0x33, 0x68, 0x80, 0x62,
|
||||
0xdf, 0xa6, 0x47, 0x36, 0xee, 0x45, 0x8d, 0x6e, 0x9c, 0x77, 0xc9, 0xf2, 0xd4, 0x87, 0xee, 0xc5,
|
||||
0xb2, 0x54, 0x7f, 0xfe, 0xb5, 0xad, 0x48, 0x57, 0x6d, 0x45, 0xfa, 0xdd, 0x56, 0xa4, 0xcf, 0x1d,
|
||||
0x65, 0xec, 0xaa, 0xa3, 0x8c, 0xfd, 0xec, 0x28, 0x63, 0xef, 0x14, 0xa1, 0x46, 0xad, 0x13, 0xd5,
|
||||
0x21, 0x7d, 0x3e, 0xf2, 0xef, 0xc2, 0x98, 0xe6, 0x3f, 0xb9, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff,
|
||||
0xff, 0x65, 0xd1, 0xd8, 0x21, 0x9e, 0x05, 0x00, 0x00,
|
||||
// 507 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6b, 0x13, 0x41,
|
||||
0x18, 0xc6, 0xb3, 0x36, 0x69, 0xcd, 0x28, 0x14, 0x27, 0x4a, 0xa7, 0xa1, 0x0e, 0x31, 0x88, 0x94,
|
||||
0x60, 0x66, 0x9b, 0x58, 0xff, 0x82, 0x60, 0x23, 0x8a, 0x1e, 0x8a, 0xb2, 0xa5, 0x1e, 0xbc, 0xc8,
|
||||
0x64, 0x77, 0xba, 0x5d, 0xd2, 0xdd, 0x59, 0x76, 0x26, 0x6b, 0x73, 0x13, 0xc1, 0x8b, 0x27, 0xbf,
|
||||
0x88, 0x90, 0x43, 0x3f, 0x84, 0x78, 0x2a, 0x9e, 0xc4, 0x93, 0x24, 0x87, 0x7c, 0x0d, 0xd9, 0x99,
|
||||
0xdd, 0xac, 0x8d, 0x5b, 0xf0, 0x12, 0xc8, 0x3e, 0xcf, 0xef, 0x79, 0x66, 0xde, 0x7d, 0x17, 0x6c,
|
||||
0xd8, 0x5c, 0xf8, 0x5c, 0x98, 0x36, 0x0f, 0x04, 0x0b, 0xc4, 0x50, 0x98, 0x71, 0xc7, 0x94, 0xc7,
|
||||
0x24, 0x8c, 0xb8, 0xe4, 0xb0, 0xa6, 0x55, 0x32, 0x57, 0x49, 0xdc, 0xa9, 0x5f, 0xa1, 0xbe, 0x17,
|
||||
0x70, 0x53, 0xfd, 0x6a, 0x5f, 0x7d, 0x5d, 0xfb, 0xde, 0xa9, 0x7f, 0x66, 0x0a, 0x69, 0x69, 0x2d,
|
||||
0x2d, 0xf0, 0x85, 0x9b, 0x44, 0xfb, 0xc2, 0x4d, 0x05, 0x6c, 0x73, 0x9f, 0xc9, 0xfe, 0x81, 0x34,
|
||||
0xe5, 0x28, 0x64, 0xaa, 0x37, 0xa4, 0x11, 0xf5, 0x33, 0x70, 0x63, 0xae, 0xd3, 0xbe, 0xed, 0xa9,
|
||||
0x63, 0x25, 0x3e, 0xad, 0x36, 0xbf, 0x96, 0xc1, 0xea, 0xae, 0x70, 0xf7, 0x43, 0x87, 0x4a, 0xf6,
|
||||
0x5a, 0x71, 0xf0, 0x1e, 0xa8, 0xd2, 0xa1, 0x3c, 0xe4, 0x91, 0x27, 0x47, 0xc8, 0x68, 0x18, 0x9b,
|
||||
0xd5, 0x1e, 0xfa, 0x71, 0xd2, 0xbe, 0x9a, 0x9e, 0x67, 0xc7, 0x71, 0x22, 0x26, 0xc4, 0x9e, 0x8c,
|
||||
0xbc, 0xc0, 0xb5, 0x72, 0x2b, 0xdc, 0x06, 0x95, 0xfe, 0x11, 0xb7, 0x07, 0xe8, 0x42, 0xc3, 0xd8,
|
||||
0xbc, 0xd4, 0xc5, 0x24, 0x6b, 0x26, 0xba, 0x31, 0xee, 0x90, 0x5e, 0xa2, 0xeb, 0x1a, 0x4b, 0x9b,
|
||||
0xe1, 0x63, 0x70, 0x91, 0xc5, 0x9e, 0xc3, 0x02, 0x9b, 0xa1, 0x25, 0x05, 0xde, 0x28, 0x00, 0x9f,
|
||||
0xa5, 0x96, 0x94, 0x9d, 0x23, 0xf0, 0x09, 0xa8, 0xc6, 0xf4, 0xc8, 0x73, 0xa8, 0xe4, 0x11, 0x2a,
|
||||
0x2b, 0xbe, 0x59, 0xc0, 0xbf, 0xc9, 0x3c, 0x69, 0x40, 0x0e, 0xc1, 0x17, 0xa0, 0x9c, 0x4c, 0x06,
|
||||
0x55, 0x14, 0x7c, 0xbd, 0x00, 0xde, 0xe9, 0x3d, 0x7d, 0xa9, 0xb9, 0xde, 0xb5, 0x5f, 0x27, 0xed,
|
||||
0x55, 0x3d, 0x88, 0xb6, 0x70, 0x06, 0x8d, 0x2d, 0x72, 0x77, 0x0b, 0x19, 0x96, 0x4a, 0x80, 0xfb,
|
||||
0xa0, 0x2a, 0x46, 0x81, 0x7d, 0x18, 0xf1, 0x60, 0x84, 0x96, 0xcf, 0x3d, 0xcb, 0x5e, 0xe6, 0x49,
|
||||
0x33, 0x6b, 0xff, 0x66, 0x76, 0xac, 0x3c, 0x09, 0xbe, 0x02, 0x2b, 0x07, 0x8c, 0xca, 0x61, 0xc4,
|
||||
0xd0, 0x8a, 0x0a, 0x6d, 0x14, 0x84, 0x3e, 0xd7, 0x8e, 0xf3, 0x23, 0xbb, 0x56, 0x96, 0xf2, 0xe8,
|
||||
0xe1, 0xc7, 0xd9, 0xb8, 0x95, 0xbf, 0xb8, 0xcf, 0xb3, 0x71, 0xeb, 0x56, 0x6e, 0x36, 0x8f, 0xff,
|
||||
0xda, 0xe2, 0x85, 0xdd, 0x68, 0xae, 0x83, 0xb5, 0x85, 0x47, 0x16, 0x13, 0x61, 0x62, 0xef, 0x7e,
|
||||
0x32, 0xc0, 0xd2, 0xae, 0x70, 0xe1, 0x7b, 0x70, 0xf9, 0xcc, 0x3a, 0xdd, 0x24, 0x05, 0xdb, 0x4f,
|
||||
0x16, 0x52, 0xea, 0xb7, 0xff, 0xc7, 0x95, 0x75, 0x35, 0x6b, 0xdf, 0x17, 0xef, 0xb7, 0x7d, 0xbf,
|
||||
0x5e, 0xf9, 0x30, 0x1b, 0xb7, 0x8c, 0xde, 0x83, 0x6f, 0x13, 0x6c, 0x9c, 0x4e, 0xb0, 0xf1, 0x7b,
|
||||
0x82, 0x8d, 0x2f, 0x53, 0x5c, 0x3a, 0x9d, 0xe2, 0xd2, 0xcf, 0x29, 0x2e, 0xbd, 0xc5, 0x9a, 0x10,
|
||||
0xce, 0x80, 0x78, 0xfc, 0xcc, 0x35, 0xd5, 0x18, 0xfb, 0xcb, 0xea, 0x9b, 0xb8, 0xf3, 0x27, 0x00,
|
||||
0x00, 0xff, 0xff, 0x6c, 0x14, 0x46, 0x20, 0xcd, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -359,8 +229,6 @@ type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -380,22 +248,11 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) {
|
||||
out := new(MsgSetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/SetCometInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||
@ -405,9 +262,6 @@ type UnimplementedMsgServer struct {
|
||||
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) SetCometInfo(ctx context.Context, req *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||
@ -431,24 +285,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSetCometInfo)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.consensus.v1.Msg/SetCometInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.consensus.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
@ -457,10 +293,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetCometInfo",
|
||||
Handler: _Msg_SetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/tx.proto",
|
||||
@ -591,99 +423,6 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) 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 *MsgSetCometInfo) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.LastCommit != nil {
|
||||
{
|
||||
size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.ValidatorsHash) > 0 {
|
||||
i -= len(m.ValidatorsHash)
|
||||
copy(dAtA[i:], m.ValidatorsHash)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorsHash)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Evidence) > 0 {
|
||||
for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(m.Authority) > 0 {
|
||||
i -= len(m.Authority)
|
||||
copy(dAtA[i:], m.Authority)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) 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 *MsgSetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovTx(v)
|
||||
base := offset
|
||||
@ -741,46 +480,6 @@ func (m *MsgUpdateParamsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Authority)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if len(m.Evidence) > 0 {
|
||||
for _, e := range m.Evidence {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
}
|
||||
l = len(m.ValidatorsHash)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.LastCommit != nil {
|
||||
l = m.LastCommit.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func sovTx(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@ -1135,276 +834,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSetCometInfo) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSetCometInfo: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSetCometInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
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 ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authority = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Evidence = append(m.Evidence, &v11.Misbehavior{})
|
||||
if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ValidatorsHash == nil {
|
||||
m.ValidatorsHash = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.LastCommit == nil {
|
||||
m.LastCommit = &v11.CommitInfo{}
|
||||
}
|
||||
if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSetCometInfoResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipTx(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -765,21 +765,6 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// GetCometInfo mocks base method.
|
||||
func (m *MockConsensusKeeper) GetCometInfo(arg0 context.Context, arg1 *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetCometInfo", arg0, arg1)
|
||||
ret0, _ := ret[0].(*types.QueryGetCometInfoResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetCometInfo indicates an expected call of GetCometInfo.
|
||||
func (mr *MockConsensusKeeperMockRecorder) GetCometInfo(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCometInfo", reflect.TypeOf((*MockConsensusKeeper)(nil).GetCometInfo), arg0, arg1)
|
||||
}
|
||||
|
||||
// Params mocks base method.
|
||||
func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
||||
@ -118,5 +118,4 @@ func (StakingHooksWrapper) IsOnePerModuleType() {}
|
||||
|
||||
type ConsensusKeeper interface {
|
||||
Params(context.Context, *consensustypes.QueryParamsRequest) (*consensustypes.QueryParamsResponse, error)
|
||||
GetCometInfo(context.Context, *consensustypes.QueryGetCometInfoRequest) (*consensustypes.QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user