Add 1 tablespoon of oil to a pot and bring the heat to medium.
Add the leeks and 2 minced garlic cloves. Saute for 5 minutes.
Stir in the broth and potatoes and bring to a boil. Then reduce the heat to low and cook for 15 minutes.
In the meantime, make spinach pesto. Add 2 cups spinach, the remaining olive oil, remaining garlic, juice from ½ lemon, ½ teaspoon salt, and the walnuts to a food processor.
Blend until smooth.
Once the potatoes in the soup are tender, add 4 cups of spinach to the pot and cook for 2 more minutes, until the spinach is wilted.
Transfer the soup to a blender.
Blend until smooth.
Return the soup to the pot and add the remaining lemon juice, remaining salt, and pepper. Cover and bring to a simmer.
Add the remaining 2 cups spinach to the soup pot and stir for 1 minute to wilt the spinach.