func (s *server) GetStateKeys(ctx context.Context, req *pb.GetStateKeysRequest) (*pb.StateKeys, error) {
	if r, found := s.relayers[req.ShardID]; found {
		keyH, err := chainhash.BytesToHashes(req.Key)
		if err != nil {
			return nil, err
		}

		vals, err := r.GetStateKeys(keyH)
		if err != nil {
			return nil, err
		}

		return &pb.StateKeys{
			Values: chainhash.HashesToBytes(vals),
		}, nil
	}
	return nil, fmt.Errorf("not tracking shard %d", req.ShardID)
}
// GetStateKeys get multiple keys from the state for a certain shard.
GetStateKeys get multiple keys from the state for a certain shard.
// GetStateKeys get multiple keys from the state for a certain shard .
func (s *server) GetStateKeys(ctx context.Context, req *pb.GetStateKeysRequest) (*pb.StateKeys, error) {
	if r, found := s.relayers[req.ShardID]; found {
		keyH, err := chainhash.BytesToHashes(req.Key)
		if err != nil {
			return nil, err
		}
		vals, err := r.GetStateKeys(keyH)
		if err != nil {
			return nil, err
		}
		return &pb.StateKeys{
			Values: chainhash.HashesToBytes(vals),
		}, nil
	}
	return nil, fmt.Errorf("not tracking shard %d", req.ShardID)
}
func ( s * server ) GetStateKeys ( ctx context . Context , req * pb . GetStateKeysRequest ) ( * pb . StateKeys , error ) { if r , found := s . relayers [ req . ShardID ] ; found { keyH , err := chainhash . BytesToHashes ( req . Key ) if err != nil { return nil , err } vals , err := r . GetStateKeys ( keyH ) if err != nil { return nil , err } return & pb . StateKeys { Values : chainhash . HashesToBytes ( vals ) , } , nil } return nil , fmt . Errorf ( " " , req . ShardID ) }
GetStateKeys get multiple keys from the state for a certain shard.
GetStateKeys get multiple keys from the state for a certain shard .