func (s Subspace) kvStore(ctx sdk.Context) sdk.KVStore {
	return prefix.NewStore(ctx.KVStore(s.key), append(s.name, '/'))
}
Returns a KVStore identical with ctx.KVStore(s.key).Prefix()
package subspace
import (
	"fmt"
	"reflect"
	"github.com/Dipper-Labs/Dipper-Protocol/app/protocol"
	"github.com/Dipper-Labs/Dipper-Protocol/codec"
	"github.com/Dipper-Labs/Dipper-Protocol/store/prefix"
	sdk "github.com/Dipper-Labs/Dipper-Protocol/types"
)
const (
	StoreKey  = protocol.ParamsStoreKey
	TStoreKey = protocol.ParamsTStoreKey
)
type Subspace struct {
	cdc   *codec.Codec
	key   sdk.StoreKey  
	tkey  sdk.StoreKey  
	name  []byte
	table KeyTable
}
func NewSubspace(cdc *codec.Codec, key sdk.StoreKey, tkey sdk.StoreKey, name string) Subspace {
	return Subspace{
		cdc:   cdc,
		key:   key,
		tkey:  tkey,
		name:  []byte(name),
		table: NewKeyTable(),
	}
}
func (s Subspace) HasKeyTable() bool {
	return len(s.table.m) > 0
}
func (s Subspace) WithKeyTable(table KeyTable) Subspace {
	if table.m == nil {
		panic("SetKeyTable() called with nil KeyTable")
	}
	if len(s.table.m) != 0 {
		panic("SetKeyTable() called on already initialized Subspace")
	}
	for k, v := range table.m {
		s.table.m[k] = v
	}
	name := s.name
	s.name = make([]byte, len(name), len(name)+table.maxKeyLength())
	copy(s.name, name)
	return s
}