// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: agoric/vbank/vbank.proto

package types

import (
	cosmossdk_io_math "cosmossdk.io/math"
	fmt "fmt"
	github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// The module governance/configuration parameters.
type Params struct {
	// reward_epoch_duration_blocks is the length of a reward epoch, in blocks.
	// A value of zero has the same meaning as a value of one:
	// the full reward buffer should be distributed immediately.
	RewardEpochDurationBlocks int64 `protobuf:"varint,1,opt,name=reward_epoch_duration_blocks,json=rewardEpochDurationBlocks,proto3" json:"reward_epoch_duration_blocks,omitempty" yaml:"reward_epoch_duration_blocks"`
	// per_epoch_reward_fraction is a fraction of the reward pool to distrubute
	// once every reward epoch.  If less than zero, use approximately continuous
	// per-block distribution.
	PerEpochRewardFraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=per_epoch_reward_fraction,json=perEpochRewardFraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"per_epoch_reward_fraction" yaml:"discrete_epoch_reward_fraction"`
	// reward_smoothing_blocks is the number of blocks over which to distribute
	// an epoch's rewards.  If zero, use the same value as
	// reward_epoch_duration_blocks.
	RewardSmoothingBlocks int64 `protobuf:"varint,3,opt,name=reward_smoothing_blocks,json=rewardSmoothingBlocks,proto3" json:"reward_smoothing_blocks,omitempty" yaml:"reward_smoothing_blocks"`
	// allowed_monitoring_accounts is an array of account addresses that can be
	// monitored for sends and receives.  An element of `"*"` will permit any
	// address.
	AllowedMonitoringAccounts []string `protobuf:"bytes,4,rep,name=allowed_monitoring_accounts,json=allowedMonitoringAccounts,proto3" json:"allowed_monitoring_accounts,omitempty" yaml:"allowed_monitoring_accounts"`
}

func (m *Params) Reset()      { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
	return fileDescriptor_5e89b3b9e5e671b4, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
	return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
	xxx_messageInfo_Params.DiscardUnknown(m)
}

var xxx_messageInfo_Params proto.InternalMessageInfo

func (m *Params) GetRewardEpochDurationBlocks() int64 {
	if m != nil {
		return m.RewardEpochDurationBlocks
	}
	return 0
}

func (m *Params) GetRewardSmoothingBlocks() int64 {
	if m != nil {
		return m.RewardSmoothingBlocks
	}
	return 0
}

func (m *Params) GetAllowedMonitoringAccounts() []string {
	if m != nil {
		return m.AllowedMonitoringAccounts
	}
	return nil
}

// The current state of the module.
type State struct {
	// rewardPool is the current balance of rewards in the module account.
	// NOTE: Tracking manually since there is no bank call for getting a
	// module account balance by name.
	RewardPool github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=reward_pool,json=rewardPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"reward_pool" yaml:"reward_pool"`
	// reward_block_amount is the amount of reward, if available, to send to the
	// fee collector module on every block.
	RewardBlockAmount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=reward_block_amount,json=rewardBlockAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"reward_block_amount" yaml:"reward_block_amount"`
	// last_sequence is a sequence number for communicating with the VM.
	LastSequence                uint64 `protobuf:"varint,3,opt,name=last_sequence,json=lastSequence,proto3" json:"last_sequence,omitempty" yaml:"last_sequence"`
	LastRewardDistributionBlock int64  `protobuf:"varint,4,opt,name=last_reward_distribution_block,json=lastRewardDistributionBlock,proto3" json:"last_reward_distribution_block,omitempty" yaml:"last_reward_distribution_block"`
}

func (m *State) Reset()         { *m = State{} }
func (m *State) String() string { return proto.CompactTextString(m) }
func (*State) ProtoMessage()    {}
func (*State) Descriptor() ([]byte, []int) {
	return fileDescriptor_5e89b3b9e5e671b4, []int{1}
}
func (m *State) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_State.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 *State) XXX_Merge(src proto.Message) {
	xxx_messageInfo_State.Merge(m, src)
}
func (m *State) XXX_Size() int {
	return m.Size()
}
func (m *State) XXX_DiscardUnknown() {
	xxx_messageInfo_State.DiscardUnknown(m)
}

var xxx_messageInfo_State proto.InternalMessageInfo

func (m *State) GetRewardPool() github_com_cosmos_cosmos_sdk_types.Coins {
	if m != nil {
		return m.RewardPool
	}
	return nil
}

func (m *State) GetRewardBlockAmount() github_com_cosmos_cosmos_sdk_types.Coins {
	if m != nil {
		return m.RewardBlockAmount
	}
	return nil
}

func (m *State) GetLastSequence() uint64 {
	if m != nil {
		return m.LastSequence
	}
	return 0
}

func (m *State) GetLastRewardDistributionBlock() int64 {
	if m != nil {
		return m.LastRewardDistributionBlock
	}
	return 0
}

func init() {
	proto.RegisterType((*Params)(nil), "agoric.vbank.Params")
	proto.RegisterType((*State)(nil), "agoric.vbank.State")
}

func init() { proto.RegisterFile("agoric/vbank/vbank.proto", fileDescriptor_5e89b3b9e5e671b4) }

var fileDescriptor_5e89b3b9e5e671b4 = []byte{
	// 606 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x31, 0x6f, 0xd3, 0x40,
	0x14, 0xc7, 0xe3, 0x26, 0x54, 0xf4, 0x5a, 0x06, 0x4c, 0x01, 0xa7, 0x45, 0x76, 0x74, 0x08, 0x08,
	0x03, 0xb6, 0x0a, 0x0b, 0xaa, 0xc4, 0x50, 0x53, 0x3a, 0x15, 0x54, 0xb9, 0x5b, 0x97, 0xe8, 0x7c,
	0xbe, 0x3a, 0x56, 0x6c, 0xbf, 0x70, 0x77, 0x69, 0xe9, 0xca, 0xc2, 0xca, 0x08, 0x5b, 0x67, 0x3e,
	0x49, 0xc5, 0xd4, 0x11, 0x21, 0x61, 0x50, 0xbb, 0x30, 0xfb, 0x13, 0x20, 0xdf, 0x5d, 0x69, 0x83,
	0x50, 0x11, 0x4b, 0x92, 0xcb, 0xef, 0xff, 0x9e, 0xff, 0xef, 0xdd, 0xf3, 0x43, 0x0e, 0x49, 0x81,
	0x67, 0x34, 0xd8, 0x8b, 0x49, 0x39, 0xd2, 0x9f, 0xfe, 0x98, 0x83, 0x04, 0x7b, 0x41, 0x13, 0x5f,
	0xfd, 0xb7, 0xb4, 0x98, 0x42, 0x0a, 0x0a, 0x04, 0xcd, 0x2f, 0xad, 0x59, 0x72, 0x29, 0x88, 0x02,
	0x44, 0x10, 0x13, 0xc1, 0x82, 0xbd, 0x95, 0x98, 0x49, 0xb2, 0x12, 0x50, 0xc8, 0x4a, 0xcd, 0xf1,
	0xe7, 0x36, 0x9a, 0xdd, 0x22, 0x9c, 0x14, 0xc2, 0x1e, 0xa2, 0x3b, 0x9c, 0xed, 0x13, 0x9e, 0x0c,
	0xd8, 0x18, 0xe8, 0x70, 0x90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	0x40, 0x8f, 0xe7, 0xfa, 0x05, 0xac, 0x4c, 0xaf, 0x76, 0x9a, 0xfb, 0x0d, 0xa3, 0xa3, 0x13, 0xd7,
	0x3a, 0x3e, 0x71, 0xad, 0x1f, 0x27, 0xae, 0xf5, 0xfe, 0xd4, 0x6d, 0x1d, 0x9f, 0xba, 0xad, 0x2f,
	0xa7, 0x6e, 0x6b, 0xe7, 0xe9, 0x85, 0x5e, 0xac, 0xe9, 0x7d, 0xa1, 0x97, 0x83, 0xea, 0x45, 0x0a,
	0x39, 0x29, 0xd3, 0xb3, 0x26, 0xbd, 0x31, 0xab, 0x44, 0x75, 0x28, 0x9e, 0x55, 0x7b, 0xe0, 0xc9,
	0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xe4, 0xc6, 0x3a, 0x67, 0x04, 0x00, 0x00,
}

func (this *Params) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*Params)
	if !ok {
		that2, ok := that.(Params)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.RewardEpochDurationBlocks != that1.RewardEpochDurationBlocks {
		return false
	}
	if !this.PerEpochRewardFraction.Equal(that1.PerEpochRewardFraction) {
		return false
	}
	if this.RewardSmoothingBlocks != that1.RewardSmoothingBlocks {
		return false
	}
	if len(this.AllowedMonitoringAccounts) != len(that1.AllowedMonitoringAccounts) {
		return false
	}
	for i := range this.AllowedMonitoringAccounts {
		if this.AllowedMonitoringAccounts[i] != that1.AllowedMonitoringAccounts[i] {
			return false
		}
	}
	return true
}
func (this *State) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*State)
	if !ok {
		that2, ok := that.(State)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.RewardPool) != len(that1.RewardPool) {
		return false
	}
	for i := range this.RewardPool {
		if !this.RewardPool[i].Equal(&that1.RewardPool[i]) {
			return false
		}
	}
	if len(this.RewardBlockAmount) != len(that1.RewardBlockAmount) {
		return false
	}
	for i := range this.RewardBlockAmount {
		if !this.RewardBlockAmount[i].Equal(&that1.RewardBlockAmount[i]) {
			return false
		}
	}
	if this.LastSequence != that1.LastSequence {
		return false
	}
	if this.LastRewardDistributionBlock != that1.LastRewardDistributionBlock {
		return false
	}
	return true
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.AllowedMonitoringAccounts) > 0 {
		for iNdEx := len(m.AllowedMonitoringAccounts) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.AllowedMonitoringAccounts[iNdEx])
			copy(dAtA[i:], m.AllowedMonitoringAccounts[iNdEx])
			i = encodeVarintVbank(dAtA, i, uint64(len(m.AllowedMonitoringAccounts[iNdEx])))
			i--
			dAtA[i] = 0x22
		}
	}
	if m.RewardSmoothingBlocks != 0 {
		i = encodeVarintVbank(dAtA, i, uint64(m.RewardSmoothingBlocks))
		i--
		dAtA[i] = 0x18
	}
	{
		size := m.PerEpochRewardFraction.Size()
		i -= size
		if _, err := m.PerEpochRewardFraction.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintVbank(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	if m.RewardEpochDurationBlocks != 0 {
		i = encodeVarintVbank(dAtA, i, uint64(m.RewardEpochDurationBlocks))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *State) 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 *State) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.LastRewardDistributionBlock != 0 {
		i = encodeVarintVbank(dAtA, i, uint64(m.LastRewardDistributionBlock))
		i--
		dAtA[i] = 0x20
	}
	if m.LastSequence != 0 {
		i = encodeVarintVbank(dAtA, i, uint64(m.LastSequence))
		i--
		dAtA[i] = 0x18
	}
	if len(m.RewardBlockAmount) > 0 {
		for iNdEx := len(m.RewardBlockAmount) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.RewardBlockAmount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintVbank(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.RewardPool) > 0 {
		for iNdEx := len(m.RewardPool) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.RewardPool[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintVbank(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func encodeVarintVbank(dAtA []byte, offset int, v uint64) int {
	offset -= sovVbank(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Params) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.RewardEpochDurationBlocks != 0 {
		n += 1 + sovVbank(uint64(m.RewardEpochDurationBlocks))
	}
	l = m.PerEpochRewardFraction.Size()
	n += 1 + l + sovVbank(uint64(l))
	if m.RewardSmoothingBlocks != 0 {
		n += 1 + sovVbank(uint64(m.RewardSmoothingBlocks))
	}
	if len(m.AllowedMonitoringAccounts) > 0 {
		for _, s := range m.AllowedMonitoringAccounts {
			l = len(s)
			n += 1 + l + sovVbank(uint64(l))
		}
	}
	return n
}

func (m *State) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.RewardPool) > 0 {
		for _, e := range m.RewardPool {
			l = e.Size()
			n += 1 + l + sovVbank(uint64(l))
		}
	}
	if len(m.RewardBlockAmount) > 0 {
		for _, e := range m.RewardBlockAmount {
			l = e.Size()
			n += 1 + l + sovVbank(uint64(l))
		}
	}
	if m.LastSequence != 0 {
		n += 1 + sovVbank(uint64(m.LastSequence))
	}
	if m.LastRewardDistributionBlock != 0 {
		n += 1 + sovVbank(uint64(m.LastRewardDistributionBlock))
	}
	return n
}

func sovVbank(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozVbank(x uint64) (n int) {
	return sovVbank(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowVbank
			}
			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: Params: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardEpochDurationBlocks", wireType)
			}
			m.RewardEpochDurationBlocks = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RewardEpochDurationBlocks |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PerEpochRewardFraction", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				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 ErrInvalidLengthVbank
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthVbank
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.PerEpochRewardFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardSmoothingBlocks", wireType)
			}
			m.RewardSmoothingBlocks = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RewardSmoothingBlocks |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AllowedMonitoringAccounts", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				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 ErrInvalidLengthVbank
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthVbank
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.AllowedMonitoringAccounts = append(m.AllowedMonitoringAccounts, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipVbank(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthVbank
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *State) 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 ErrIntOverflowVbank
			}
			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: State: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardPool", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthVbank
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthVbank
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RewardPool = append(m.RewardPool, types.Coin{})
			if err := m.RewardPool[len(m.RewardPool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardBlockAmount", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthVbank
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthVbank
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RewardBlockAmount = append(m.RewardBlockAmount, types.Coin{})
			if err := m.RewardBlockAmount[len(m.RewardBlockAmount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastSequence", wireType)
			}
			m.LastSequence = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.LastSequence |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastRewardDistributionBlock", wireType)
			}
			m.LastRewardDistributionBlock = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.LastRewardDistributionBlock |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipVbank(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthVbank
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipVbank(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowVbank
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowVbank
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthVbank
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupVbank
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthVbank
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthVbank        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVbank          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVbank = fmt.Errorf("proto: unexpected end of group")
)
