Place the potatoes in a pot, cover with cold salted water and boil in their skins until soft (when inserting a small sharp knife in the middle). Drain and leave to cool for a while until you can manage to peel them.
Press the peeled potatoes through a food mill or potato ricer. Add the chestnut flour, plain flour, a generous pinch of salt and the egg.
Work the ingredients in your hands into a smooth dough. Make sure all the ingredients are well combined and the dough has turned elastic enough to roll the gnocchi.
Cut the dough into four pieces and roll each one of them on a clean surface covered with some plain flour, forming the gnocchi to your preferred size (not bigger than the size of a walnut) and shape. Bear in mind that they will be a slightly harder to manage than the traditional potato gnocchi because of the chestnut flour content.
Bring a large pot of salted water to the boil and cook the gnocchi until they come up to the surface.
Reserve in a cup some of the cooking water.
In the meantime trim the green beans and cook them in salted boiling water for a couple of minutes until al dente.
Drain them and run under cold water in order to keep their vibrant green colour.
Next cut them into smaller even pieces.
Carefully take the cooked gnocchi out from the water with a slotted spoon.
Toss them gently with the green beans and pesto. Add some reserved water after cooking the gnocchi if the sauce is too thick.
Taste and adjust seasoning, decorate with fresh basil leaves and add more pesto if you desire.