Merge PR #5681: proto: migrate bank to hybridcodec
This commit is contained in:
parent
32b40fdb27
commit
ebbfaf2a47
@ -47,6 +47,7 @@ ignore:
|
||||
- "*.md"
|
||||
- "*.rst"
|
||||
- "**/*.pb.go"
|
||||
- "x/**/*.pb.go"
|
||||
- "x/**/test_common.go"
|
||||
- "scripts/"
|
||||
- "contrib"
|
||||
|
||||
@ -167,7 +167,7 @@ func NewSimApp(
|
||||
appCodec, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount,
|
||||
)
|
||||
app.BankKeeper = bank.NewBaseKeeper(
|
||||
app.cdc, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(),
|
||||
appCodec, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(),
|
||||
)
|
||||
app.SupplyKeeper = supply.NewKeeper(
|
||||
appCodec, keys[supply.StoreKey], app.AccountKeeper, app.BankKeeper, maccPerms,
|
||||
|
||||
@ -3,8 +3,8 @@ package bank
|
||||
// nolint
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// GetTxCmd returns the transaction commands for this module
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/context"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// QueryBalancesRequestHandlerFn returns a REST handler that queries for all
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// SendReq defines the properties of a send request's body.
|
||||
|
||||
@ -3,8 +3,8 @@ package bank
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// NewHandler returns a handler for "bank" type messages.
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
)
|
||||
|
||||
// Register concrete types on codec codec
|
||||
func RegisterCodec(cdc *codec.Codec) {
|
||||
cdc.RegisterConcrete(MsgSend{}, "cosmos-sdk/MsgSend", nil)
|
||||
cdc.RegisterConcrete(MsgMultiSend{}, "cosmos-sdk/MsgMultiSend", nil)
|
||||
}
|
||||
|
||||
// module codec
|
||||
var ModuleCdc *codec.Codec
|
||||
|
||||
func init() {
|
||||
ModuleCdc = codec.New()
|
||||
RegisterCodec(ModuleCdc)
|
||||
ModuleCdc.Seal()
|
||||
}
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// RegisterInvariants registers the bank module invariants
|
||||
@ -11,7 +11,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
vestexported "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
)
|
||||
|
||||
@ -35,7 +35,7 @@ type BaseKeeper struct {
|
||||
}
|
||||
|
||||
func NewBaseKeeper(
|
||||
cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool,
|
||||
cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool,
|
||||
) BaseKeeper {
|
||||
|
||||
ps := paramSpace.WithKeyTable(types.ParamKeyTable())
|
||||
@ -146,7 +146,7 @@ var _ SendKeeper = (*BaseSendKeeper)(nil)
|
||||
type BaseSendKeeper struct {
|
||||
BaseViewKeeper
|
||||
|
||||
cdc *codec.Codec
|
||||
cdc codec.Marshaler
|
||||
ak types.AccountKeeper
|
||||
storeKey sdk.StoreKey
|
||||
paramSpace paramtypes.Subspace
|
||||
@ -156,7 +156,7 @@ type BaseSendKeeper struct {
|
||||
}
|
||||
|
||||
func NewBaseSendKeeper(
|
||||
cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool,
|
||||
cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool,
|
||||
) BaseSendKeeper {
|
||||
|
||||
return BaseSendKeeper{
|
||||
@ -341,7 +341,7 @@ func (k BaseSendKeeper) SetBalance(ctx sdk.Context, addr sdk.AccAddress, balance
|
||||
balancesStore := prefix.NewStore(store, types.BalancesPrefix)
|
||||
accountStore := prefix.NewStore(balancesStore, addr.Bytes())
|
||||
|
||||
bz := k.cdc.MustMarshalBinaryBare(balance)
|
||||
bz := k.cdc.MustMarshalBinaryBare(&balance)
|
||||
accountStore.Set([]byte(balance.Denom), bz)
|
||||
|
||||
return nil
|
||||
@ -385,13 +385,13 @@ type ViewKeeper interface {
|
||||
|
||||
// BaseViewKeeper implements a read only keeper implementation of ViewKeeper.
|
||||
type BaseViewKeeper struct {
|
||||
cdc *codec.Codec
|
||||
cdc codec.Marshaler
|
||||
storeKey sdk.StoreKey
|
||||
ak types.AccountKeeper
|
||||
}
|
||||
|
||||
// NewBaseViewKeeper returns a new BaseViewKeeper.
|
||||
func NewBaseViewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper) BaseViewKeeper {
|
||||
func NewBaseViewKeeper(cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper) BaseViewKeeper {
|
||||
return BaseViewKeeper{
|
||||
cdc: cdc,
|
||||
storeKey: storeKey,
|
||||
@ -13,7 +13,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// NewQuerier returns a new sdk.Keeper instance.
|
||||
@ -7,8 +7,8 @@ import (
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() {
|
||||
@ -16,9 +16,9 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/client/cli"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/client/rest"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/simulation"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
sim "github.com/cosmos/cosmos-sdk/x/simulation"
|
||||
)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
// Simulation parameter constants
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/simapp/helpers"
|
||||
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/simulation"
|
||||
)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/simulation"
|
||||
)
|
||||
|
||||
|
||||
28
x/bank/types/codec.go
Normal file
28
x/bank/types/codec.go
Normal file
@ -0,0 +1,28 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
)
|
||||
|
||||
// Register concrete types on codec codec
|
||||
func RegisterCodec(cdc *codec.Codec) {
|
||||
cdc.RegisterConcrete(MsgSend{}, "cosmos-sdk/MsgSend", nil)
|
||||
cdc.RegisterConcrete(MsgMultiSend{}, "cosmos-sdk/MsgMultiSend", nil)
|
||||
}
|
||||
|
||||
var (
|
||||
amino = codec.New()
|
||||
|
||||
// ModuleCdc references the global x/staking module codec. Note, the codec should
|
||||
// ONLY be used in certain instances of tests and for JSON encoding as Amino is
|
||||
// still used for that purpose.
|
||||
//
|
||||
// The actual codec used for serialization should be provided to x/staking and
|
||||
// defined at the application level.
|
||||
ModuleCdc = codec.NewHybridCodec(amino)
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterCodec(amino)
|
||||
amino.Seal()
|
||||
}
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@ -5,13 +5,6 @@ import (
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// MsgSend - high level transaction of the coin module
|
||||
type MsgSend struct {
|
||||
FromAddress sdk.AccAddress `json:"from_address" yaml:"from_address"`
|
||||
ToAddress sdk.AccAddress `json:"to_address" yaml:"to_address"`
|
||||
Amount sdk.Coins `json:"amount" yaml:"amount"`
|
||||
}
|
||||
|
||||
var _ sdk.Msg = MsgSend{}
|
||||
|
||||
// NewMsgSend - construct arbitrary multi-in, multi-out send msg.
|
||||
@ -52,12 +45,6 @@ func (msg MsgSend) GetSigners() []sdk.AccAddress {
|
||||
return []sdk.AccAddress{msg.FromAddress}
|
||||
}
|
||||
|
||||
// MsgMultiSend - high level transaction of the coin module
|
||||
type MsgMultiSend struct {
|
||||
Inputs []Input `json:"inputs" yaml:"inputs"`
|
||||
Outputs []Output `json:"outputs" yaml:"outputs"`
|
||||
}
|
||||
|
||||
var _ sdk.Msg = MsgMultiSend{}
|
||||
|
||||
// NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.
|
||||
@ -99,12 +86,6 @@ func (msg MsgMultiSend) GetSigners() []sdk.AccAddress {
|
||||
return addrs
|
||||
}
|
||||
|
||||
// Input models transaction input
|
||||
type Input struct {
|
||||
Address sdk.AccAddress `json:"address" yaml:"address"`
|
||||
Coins sdk.Coins `json:"coins" yaml:"coins"`
|
||||
}
|
||||
|
||||
// ValidateBasic - validate transaction input
|
||||
func (in Input) ValidateBasic() error {
|
||||
if len(in.Address) == 0 {
|
||||
@ -127,12 +108,6 @@ func NewInput(addr sdk.AccAddress, coins sdk.Coins) Input {
|
||||
}
|
||||
}
|
||||
|
||||
// Output models transaction outputs
|
||||
type Output struct {
|
||||
Address sdk.AccAddress `json:"address" yaml:"address"`
|
||||
Coins sdk.Coins `json:"coins" yaml:"coins"`
|
||||
}
|
||||
|
||||
// ValidateBasic - validate transaction output
|
||||
func (out Output) ValidateBasic() error {
|
||||
if len(out.Address) == 0 {
|
||||
1177
x/bank/types/types.pb.go
Normal file
1177
x/bank/types/types.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
48
x/bank/types/types.proto
Normal file
48
x/bank/types/types.proto
Normal file
@ -0,0 +1,48 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cosmos_sdk.x.bank.v1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "types/types.proto";
|
||||
|
||||
// MsgSend - high level transaction of the coin module
|
||||
message MsgSend {
|
||||
bytes from_address = 1 [
|
||||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
|
||||
(gogoproto.moretags) = "yaml:\"from_address\""
|
||||
];
|
||||
bytes to_address = 2 [
|
||||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
|
||||
(gogoproto.moretags) = "yaml:\"to_address\""
|
||||
];
|
||||
repeated cosmos_sdk.v1.Coin amount = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
|
||||
// Input models transaction input
|
||||
message Input {
|
||||
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
repeated cosmos_sdk.v1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
|
||||
// Output models transaction outputs
|
||||
message Output {
|
||||
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
repeated cosmos_sdk.v1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
|
||||
// MsgMultiSend - high level transaction of the coin module
|
||||
message MsgMultiSend {
|
||||
repeated Input inputs = 1 [(gogoproto.nullable) = false];
|
||||
repeated Output outputs = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@ -132,7 +132,7 @@ func CreateTestInputAdvanced(
|
||||
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "foochainid"}, isCheckTx, log.NewNopLogger())
|
||||
accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, pk.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount)
|
||||
bankKeeper := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
bankKeeper := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
maccPerms := map[string][]string{
|
||||
auth.FeeCollectorName: nil,
|
||||
types.ModuleName: nil,
|
||||
|
||||
@ -151,7 +151,7 @@ func createTestInput(
|
||||
|
||||
pk := keeper.NewKeeper(appCodec, keyParams, tkeyParams)
|
||||
accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, pk.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount)
|
||||
bankKeeper := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
bankKeeper := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
supplyKeeper := supply.NewKeeper(appCodec, keySupply, accountKeeper, bankKeeper, maccPerms)
|
||||
|
||||
sk := staking.NewKeeper(staking.ModuleCdc, keyStaking, bankKeeper, supplyKeeper, pk.Subspace(staking.DefaultParamspace))
|
||||
|
||||
@ -96,7 +96,7 @@ func CreateTestInput(t *testing.T, defaults types.Params) (sdk.Context, bank.Kee
|
||||
paramsKeeper := keeper.NewKeeper(appCodec, keyParams, tkeyParams)
|
||||
accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount)
|
||||
|
||||
bk := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, paramsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
bk := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs)
|
||||
maccPerms := map[string][]string{
|
||||
auth.FeeCollectorName: nil,
|
||||
staking.NotBondedPoolName: {supply.Burner, supply.Staking},
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: x/slashing/internal/types/types.proto
|
||||
// source: x/slashing/types/types.proto
|
||||
|
||||
package types
|
||||
|
||||
@ -38,7 +38,7 @@ func (m *MsgUnjail) Reset() { *m = MsgUnjail{} }
|
||||
func (m *MsgUnjail) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgUnjail) ProtoMessage() {}
|
||||
func (*MsgUnjail) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2b882c3b0cdd6f57, []int{0}
|
||||
return fileDescriptor_57cb37764f972476, []int{0}
|
||||
}
|
||||
func (m *MsgUnjail) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -87,7 +87,7 @@ type ValidatorSigningInfo struct {
|
||||
func (m *ValidatorSigningInfo) Reset() { *m = ValidatorSigningInfo{} }
|
||||
func (*ValidatorSigningInfo) ProtoMessage() {}
|
||||
func (*ValidatorSigningInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2b882c3b0cdd6f57, []int{1}
|
||||
return fileDescriptor_57cb37764f972476, []int{1}
|
||||
}
|
||||
func (m *ValidatorSigningInfo) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -163,43 +163,41 @@ func init() {
|
||||
proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("x/slashing/internal/types/types.proto", fileDescriptor_2b882c3b0cdd6f57)
|
||||
}
|
||||
func init() { proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) }
|
||||
|
||||
var fileDescriptor_2b882c3b0cdd6f57 = []byte{
|
||||
// 491 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3f, 0x6f, 0xd3, 0x4e,
|
||||
0x18, 0xc7, 0x73, 0xbf, 0xfc, 0x5a, 0xca, 0x25, 0x74, 0x70, 0x41, 0x58, 0x11, 0xf2, 0x59, 0x96,
|
||||
0x40, 0x59, 0x6a, 0x8b, 0xb2, 0x65, 0xc3, 0x5d, 0x40, 0xe2, 0x8f, 0x64, 0xda, 0x0e, 0x0c, 0x58,
|
||||
0xe7, 0xdc, 0xe5, 0x7c, 0xc4, 0xbe, 0x8b, 0x7c, 0xe7, 0x2a, 0x59, 0x79, 0x05, 0x1d, 0x19, 0xfb,
|
||||
0x42, 0x78, 0x01, 0x1d, 0x3b, 0x32, 0x19, 0x94, 0x2c, 0x88, 0x31, 0x63, 0x27, 0x64, 0x5f, 0x4c,
|
||||
0x23, 0xc4, 0xc0, 0x92, 0xf8, 0xfb, 0xb9, 0xe7, 0xfb, 0x7c, 0xef, 0xf1, 0x63, 0xf8, 0x78, 0x1e,
|
||||
0xa8, 0x0c, 0xab, 0x94, 0x0b, 0x16, 0x70, 0xa1, 0x69, 0x21, 0x70, 0x16, 0xe8, 0xc5, 0x8c, 0x2a,
|
||||
0xf3, 0xeb, 0xcf, 0x0a, 0xa9, 0xa5, 0x65, 0x8f, 0xa5, 0xca, 0xa5, 0x8a, 0x15, 0x99, 0xfa, 0x73,
|
||||
0xbf, 0x75, 0xf8, 0xe7, 0x4f, 0x07, 0x4f, 0x74, 0xca, 0x0b, 0x12, 0xcf, 0x70, 0xa1, 0x17, 0x41,
|
||||
0x53, 0x1c, 0x30, 0xc9, 0xe4, 0xed, 0x93, 0xe9, 0x30, 0x40, 0x4c, 0x4a, 0x96, 0x51, 0x53, 0x92,
|
||||
0x94, 0x93, 0x40, 0xf3, 0x9c, 0x2a, 0x8d, 0xf3, 0x99, 0x29, 0xf0, 0x3e, 0x01, 0x78, 0xf7, 0xb5,
|
||||
0x62, 0xa7, 0xe2, 0x23, 0xe6, 0x99, 0x55, 0xc2, 0xfd, 0x73, 0x9c, 0x71, 0x82, 0xb5, 0x2c, 0x62,
|
||||
0x4c, 0x48, 0x61, 0x03, 0x17, 0x0c, 0xfb, 0xe1, 0x9b, 0x9f, 0x15, 0xba, 0x53, 0x6b, 0xaa, 0xd4,
|
||||
0xba, 0x42, 0xfb, 0x0b, 0x9c, 0x67, 0x23, 0x6f, 0x03, 0xbc, 0x9b, 0x0a, 0x1d, 0x32, 0xae, 0xd3,
|
||||
0x32, 0xf1, 0xc7, 0x32, 0x0f, 0xcc, 0xa5, 0x37, 0x7f, 0x87, 0x8a, 0x4c, 0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0x8e, 0xa7, 0x2a, 0x1e, 0xcb, 0xb2, 0xfe,
|
||||
0xe8, 0xec, 0xdd, 0x66, 0x08, 0x77, 0x5d, 0xa1, 0x47, 0x26, 0xe8, 0xaf, 0x65, 0x5e, 0x74, 0x60,
|
||||
0x78, 0xd8, 0xe0, 0x63, 0x43, 0x47, 0x7b, 0x9f, 0x2f, 0x51, 0xe7, 0xc7, 0x25, 0x02, 0x21, 0xba,
|
||||
0x5a, 0x3a, 0xe0, 0x7a, 0xe9, 0x80, 0xef, 0x4b, 0x07, 0x5c, 0xac, 0x9c, 0xce, 0xf5, 0xca, 0xe9,
|
||||
0x7c, 0x5d, 0x39, 0x9d, 0xf7, 0x3b, 0xcd, 0x36, 0x92, 0xdd, 0x66, 0xc4, 0x67, 0xbf, 0x02, 0x00,
|
||||
0x00, 0xff, 0xff, 0x61, 0xf4, 0xaf, 0xf7, 0xf7, 0x02, 0x00, 0x00,
|
||||
var fileDescriptor_57cb37764f972476 = []byte{
|
||||
// 488 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6f, 0xd3, 0x40,
|
||||
0x14, 0xc7, 0x73, 0x04, 0x4a, 0xb9, 0x84, 0x0e, 0x2e, 0x08, 0x2b, 0xaa, 0x7c, 0x91, 0x07, 0x94,
|
||||
0xa5, 0xb6, 0x28, 0x5b, 0x36, 0xdc, 0x01, 0x90, 0xf8, 0x21, 0x99, 0xb6, 0x03, 0x03, 0xd6, 0x39,
|
||||
0x77, 0x39, 0x1f, 0xb1, 0xef, 0x22, 0xdf, 0xb9, 0x4a, 0x56, 0xfe, 0x82, 0x8e, 0x8c, 0xfd, 0x43,
|
||||
0xf8, 0x03, 0x3a, 0x76, 0x64, 0x32, 0x28, 0x59, 0x10, 0x63, 0xc6, 0x4e, 0xc8, 0xbe, 0x98, 0x46,
|
||||
0x15, 0x42, 0x5d, 0xec, 0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, 0xf5, 0x1c, 0xb5, 0x7e, 0x9d, 0x23, 0x10, 0xbc, 0xbc, 0x58, 0x38, 0xe0, 0x72, 0xe1, 0x80,
|
||||
0x9f, 0x0b, 0x07, 0x9c, 0x2d, 0x9d, 0xd6, 0xe5, 0xd2, 0x69, 0x7d, 0x5f, 0x3a, 0xad, 0x8f, 0xff,
|
||||
0x7f, 0x16, 0x37, 0xdf, 0x7e, 0xbc, 0x55, 0x5f, 0xc5, 0xf3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
|
||||
0xf7, 0x43, 0x16, 0x33, 0x16, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *ValidatorSigningInfo) Equal(that interface{}) bool {
|
||||
|
||||
@ -133,7 +133,7 @@ func CreateTestInput(t *testing.T, isCheckTx bool, initPower int64) (sdk.Context
|
||||
)
|
||||
|
||||
bk := bank.NewBaseKeeper(
|
||||
cdc,
|
||||
appCodec,
|
||||
bankKey,
|
||||
accountKeeper,
|
||||
pk.Subspace(bank.DefaultParamspace),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user